You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.2 KiB
Plaintext

11 years ago
Notes for video: http://www.youtube.com/watch?v=LlGL-uBSe6M
## ssh passwordless login
A. generate a public key ( this will create id_rsa / id_rsa.pub files in ~/.ssh folder )
ssh-keygen
# ex: prompt to comeplete
Generating public/private rsa key pair.
Enter file in which to save the key (/home/jsmith/.ssh/id_rsa):[Press Enter key]
Enter passphrase (empty for no passphrase): [Press Enter key]
Enter same passphrase again: [Pess Enter key]
Your identification has been saved in /home/heoyea/.ssh/id_rsa.
Your public key has been saved in /home/heoyea/.ssh/id_rsa.pub.
The key fingerprint is:
33:b3:fe:af:95:95:18:11:31:d5:de:96:2f:f2:35:f9 heoyea-core@.192.168.1.100
B1. copy local pub key to server pc (method 1)
11 years ago
# this will send pub key and create ~/.ssh/authorized_keys file on server pc
11 years ago
# Note: ssh-copy-id command will append keys, not overwrite it ( good for multiple keys)
11 years ago
11 years ago
ssh-copy-id -i ~/.ssh/id_rsa.pub heoyea-core@192.168.1.100
B2. copy local pub key to server pc (method 2)
# send keys to server
scp ~/.ssh/id_rsa.pub heoyea-core@192.168.1.100:/tmp/
11 years ago
11 years ago
# login to server pc then append keys manually
cat /tmp/id_rsa.pub >> ~/.ssh/authorized_keys
11 years ago
# remove public key file from tmp folder
rm /tmp/id_rsa.pub
11 years ago