Difference between revisions of "Setting up SSH key authentication on Linux/UNIX"
From froelix.com - Wiki
(Created page with ''''Create the ''.ssh'' directory on the server (if it doesn't exist yet):''' $ mkdir ~/.ssh $ chmod 700 ~/.ssh '''On the client run the following commands:'''<BR> (Don’t ent…') |
(added link for solaris) |
||
| Line 14: | Line 14: | ||
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys2 | $ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys2 | ||
$ chmod 600 ~/.ssh/authorized_keys2 | $ chmod 600 ~/.ssh/authorized_keys2 | ||
| + | |||
| + | '''More information (Solaris):''' | ||
| + | |||
| + | [http://docs.oracle.com/cd/E19253-01/816-4557/sshuser-33/index.html http://docs.oracle.com/cd/E19253-01/816-4557/sshuser-33/index.html] | ||
Revision as of 14:43, 2 June 2016
Create the .ssh directory on the server (if it doesn't exist yet):
$ mkdir ~/.ssh $ chmod 700 ~/.ssh
On the client run the following commands:
(Don’t enter a passphrase unless you want to type it every time you want to use the key)
$ ssh-keygen -t dsa $ chmod 700 ~/.ssh $ chmod 600 ~/.ssh/id_dsa $ chmod 644 ~/.ssh/id_dsa.pub $ scp ~/.ssh/id_dsa.pub <server hostname>:~/.ssh/
And on the server run these commands:
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys2 $ chmod 600 ~/.ssh/authorized_keys2
More information (Solaris):
http://docs.oracle.com/cd/E19253-01/816-4557/sshuser-33/index.html