OpenSSH Public Key Authentication Setup


This post contains a summarized recipe from OpenSSH Public Key Authentication Setup, to setup SSH public key authentication.

  1. Generate key pair:
    $ ssh-keygen -q -t rsa -f $HOME/.ssh/id_rsa -C public-key1
  2. Limit access:
    $ perl -i -ple 's/^/from="*" /' $HOME/.ssh/
  3. Append public key to the authorized_keys file on the server (called “machine”):
    $ ssh < $HOME/.ssh/ 'cat >> .ssh/authorized_keys'

Using empty passphrases is acceptable on intranet environments, so after these 3 simple steps you can login passwordlessly 😉

About Author

AMIS employee

Comments are closed.