2. SSH Client Setup

By “client” we mean the machine you will be connecting from. Simply make sure that the openssh-clients package is installed.

Type ssh username@remote_machine to connect to the remote_machine system with the username account. You will be asked for your password on the remote system. Enter it and you'll be granted access as if you were sitting at that remote system's console.

Whether you connect to one or many machines (common scenario for system administrators), the password prompt step can be bypassed by using SSH keys. Use the ssh-keygen command to generate your SSH key, and then the ssh-copy-id username@remote_machine command to copy your key over to the remote machines. When you issue the ssh-copy-id command you will be asked to enter your password on the remote system, but only once per system. Now you can SSH directly into the remote machines without being asked for your password.

[Note]Note

For this mechanism to work, you have to run the ssh-add command and enter your passphrase — created when you generated your SSH keys — each time you begin your session on the client machine.

If you get a message stating that the connection to your authentication agent could not be opened, run the eval `ssh-agent` command (note the backquotes) before running ssh-add.