分类: LINUX
2015-11-25 10:59:50
[user1@rh user1]$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/user1/.ssh/id_rsa): Created directory '/home/user1/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/user1/.ssh/id_rsa. Your public key has been saved in /home/user1/.ssh/id_rsa.pub. The key fingerprint is: e0:f0:3b:d3:0a:3d:da:42:01:6a:61:2f:6c:a0:c6:e7 [user1@rh user1]$
[user1@rh user1]$ chmod 755 ~/.ssh [user1@rh user1]$
[user1@rh user1]$ scp ~/.ssh/id_rsa.pub rh1:/home/user1/.ssh/authorized_keys user1@rh1's password: id_rsa.pub 100% 228 3.2MB/s 00:00 [user1@rh user1]$