Host SSH Aliases

In root's .bashrc are defined a number of aliases to make it a bit quicker to do commands to a single host. Basically it aliases the host name with "ssh hostname". For example typing swc-023 is the same as doing ssh swc-023; typing bg-mds-1 hostname is the name as using ssh to execute a single command on bg-mds-1: ssh bg-mds-1 hostname. Because of shell syntax, complicated commands (e.g., ones involving pipes) will need to be quoted to be executed entirely on the remote host (e.g., swc-001 "df -h | grep /export").

To do issue the same command to more than one host at the same time, use do-on-hosts and either specify a host type (e.g., --swcs) or a list of hosts using --hosts option: =--hosts swc-003,bg-mds-1,server-2. See more on the project book page.

-- JimJacobs - 2020-12-17
Topic revision: r1 - 2020-12-17, JimJacobs
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback