How to set up public key authentication for SSH

How to set up public key authentication so that you are not
prompted for a password. Here’s the quick way to do it:

$ ssh-keygen -t dsa
–> press ENTER when prompted for a pass-phrase
$ scp ~/.ssh/id_dsa.pub rhillegas@…:

$ ssh rhillegas@…

minotaur$ cat id_dsa.pub >> .ssh/authorized_keys

Now you should be able to log on without being prompted.

A simpler way is to use the ssh-copy-id command.

See here: https://www.digitalocean.com/community/articles/how-to-set-up-ssh-keys–2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s