Remote Execution

Since the early days of Unix, it has been possible to run commands on remote computers over a network connection using remote shell programs such as rsh and ssh:

        mypc: ssh mylogin@peregrine.hpc.uwm.edu ls
        Password: (enter password here)
        Data
        Desktop
        Work
        notes
        scripts
        

Caution

Older protocols such as rlogin, rsh, and telnet, should no longer be used due to their lack of security. These protocols transport passwords over the Internet in unencrypted form, so people who manage the gateway computers they pass through can easily read them.

On a typical network, the above command would prompt the user for a password to log into peregrine as the user boot camp, run the ls command on peregrine, and then exit back to the local host from which ssh was run.

It is possible to configure remote computers to accept password-less logins from trusted hosts. With a password-less login, we can run a command on a remote system almost as easily as on the local system:

        mypc: ssh mylogin@peregrine.hpc.uwm.edu
        Password: (enter password here)
        peregrine: ssh compute-001 ls
        Data
        Desktop
        Work
        notes
        scripts
        

In the example above, the node compute-001 does not ask for a password, since the request is coming from peregrine, which is a trusted host.

Key Point

Password-less login makes it convenient to automate the execution of commands on many remote machines. This idea forms the basis for distributed parallel computing.
Self-test
  1. Show a command for doing a long-listing of the /etc directory on the host some.unix.machine.edu, for which you have an account with login name "bob".
  2. What is passwordless login?