SSH keys in three easy steps

  1. Create the SSH key

    Run the following command once on each client system that you will log in from.

    Hit enter through as the defaults should be sufficiently secure for starting with SSH keys.

    clientSystem> ssh-keygen

    You should have a passphrase protecting your key, but I'd rather you use a key without a passphrase than not use a key with a passphrase.

  2. Copy the key public key to the remote system(s).

    Run the following command on each client system for each remote system that the client will log into.

    clientSystem> ssh-copy-id remoteSystem

    Do this for each remote system that you will log into from the client that you're on.

  3. Use the SSH key

    Using keys which don't have a passphrase is trivial.

    clientSystem> ssh remoteSystem

    You should be logged into the remote system without being prompted for a password because your new SSH key authenticated you to the remote system.

There are many, Many, MANY, options that can be used. But the defaults are usually reasonable. It's better to use any key than to not use keys.

There are plenty of options that can be done to make the keys safer to use, restrict where they are used from, and what they can be used for. But those are refinements on how SSH keys are used.

Please create and use SSH keys following the three easy steps above.