Linux Guide/SSH

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

SSH stands for Secure Shell, and is a means of using an encrypted channel to control another computer using a commandline interface. It also allows tunneling protocols and can allow full graphical control if combined with X11 forwarding.

[edit] The client machine

"Client machine" refers to the machine which will be running the SSH client. In general, this will be the machine which the operator is actually seated or located at.

[edit] Client software for a Linux machine

Most Linux machines include a commandline SSH client, suitable for controlling a remote system using shell commands. To use this client, open a terminal, then use the command "ssh -l (login name on the remote computer) (URL or IP address of remote computer)", replacing the parenthesized values as appropriate. The PuTTY client, listed below, is also available for Linux machines. Upon logging into the remote machine, you will be prompted for a password. The password entered must be the password for that account on the remote machine, not the local one.

[edit] Client software for Windows and Macintosh

For Windows and Macintosh machines, the PuTTY client is an easy way to establish a commandline SSH session with a remote machine. This program is small enough to fit easily onto a USB flash drive, and runs as a self-contained executable (no installation is required on the host machine). To use this program, double-click the "putty" or "putty.exe" icon. Input the remote computer's URL or IP address into the "Host name (or IP address)" field. If logging of the session is desired, click the left "Logging" tab for options. Under the "Session" tab, check that the "Protocol" button is set to "SSH", and that the port is set to 22 (unless specifically informed that the remote machine uses a different port for SSH login, in which case the port should be set to that value. It is very uncommon for SSH logins to be handled on a port other than 22.) As of this writing, the SSH protocol and port 22 are the default settings and should require no changes. Once this is complete, click the "OK" button to establish the connection. Once connected, a prompt for a username will appear, followed by a prompt for a password. These should be a username and password on the remote machine, not the local one.