Using SSL keys to login to a server

To avoid havinng to enter a password every time you log in to a server, you can instead use SSL keys.

How to login to server with SSL keys

Enter the following command to start generating a rsa keypair:

# ssh-keygen

When the message ‘Enter file in which to save the key’ appears, just leave the filename blank by pressing Enter.

When the terminal asks you to enter a passphrase, just leave this blank too and press Enter.

Then copy the keypair onto the server with one simple command:

# ssh-copy-id userid@hostname

you can now log in without a password:

# ssh userid@hostname