blob: d3dc53c39154472bafe72fd12ba2c9c28d0b72f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
##SSH Passwordless Login using Keygen##
1. _Create authentication ssh-keygen keys on local machine_
`$ ssh-keygen -t rsa`
This creates two key files in your .ssh directory,
one private and one public, id_rsa and id_rsa.pub respectively.
2. _Create .ssh directory on remote machine_
`$ ssh user@remote mkdir -p ~/.ssh`
3. _Upload the generated public key to remote machine_
`$ cat ~/.ssh/id_rsa.pub | ssh user@remote 'cat >> ~/.ssh/authorized_keys'`
4. _Set permissions on remote machine_
`$ ssh user@remote "chmod 700 ~/ssh ; chmod 640 ~/.ssh/authorized_keys"`
5. _Login to remote machine without password_
`ssh user@remote`
|