Thursday, May 3, 2012

scp without password

ls .ssh

authorized_keys known_hosts

ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/pvernet/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/pvernet/.ssh/id_rsa.
Your public key has been saved in /home/pvernet/.ssh/
The key fingerprint is:
b8:73:75:3a:43:da:5c:14:42:93:d4:7d:cb:7b:4c:e3 pvernet@pippohost105

scp .ssh/ pvernet@pippohost106:/home/pvernet/

login to pippohost106

mkdir .ssh
cat >> ~/.ssh/authorized_keys
chmod 700 ~/.ssh/authorized_keys

See also here

No comments: