Passwordless SSH log in for MAC OS X

On the machine that you want to use to ssh to the other OS X machine do this:

– Create id_rsa key.
when prompted use the suggested filename, and (I strongly recommend to select a passphrase)


– Copy public key from ~/.ssh/ to your server location (in the example below

ssh-copy-id -i ~/.ssh/ username@

– If you didn’t specify a passphrase, at this point you will be able to ssh to your server.

If you add a passphrase

You will need one more extra step to store the passphrase in the keychain so you won’t be asked to type it over and over again.
– Create a file in ~/.ssh/config
– Add these contents
Host *
AddKeysToAgent yes
UseKeychain yes

Now once you enter the passphrase, OS X wont ask you again.

Leave a Reply