Example uses of the Linux Command ssh

An Introductory Tutorial

Businessman at computer
Jupiterimages/Stockbyte/Getty Images

With the ssh command you can log in to a remote computer and work on it remotely. That is, it enables you to connect to another computer on the Internet, that could be physically located anywhere in the world, and open a window on your local machine that lets you run programs interactively on the remote machine.

For example the following command would be used to login to a computer with the network id "comp.org.net":

ssh jdoe@comp.org.net
assuming "jdoe" is the username of the account we are tying log into on this machine. The system will ask you for the password before you get the prompt that allows you to run programs on the remote computer.

If the user name of the remote machine is the same as on the local machine you can omit the user name:

ssh comp.org.net

You can also use ssh to run a command on a remote machine without login in. For example,

ssh jdoe@comp.org.net ps
will execute the command "ps" on the computer "comp.org.net" and show the results in your local window.

More From Us