原创作品,允许转载,转载时请务必以超链接形式标明文章
原始出处 、作者信息和本声明。否则将追究法律责任。
http://navyaijm.blog.51cto.com/4647068/816631
scp -P 999 root@21andy.com:/home/test.zip /home/
scp -P 999 -r /home/andy/ root@21andy.com:/home/
[root@A root]# ssh-keygen -b 1024 -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): <– 直接输入回车
Enter passphrase (empty for no passphrase): <– 直接输入回车
Enter same passphrase again: <– 直接输入回车
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is: ……
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): <– 直接输入回车
Enter passphrase (empty for no passphrase): <– 直接输入回车
Enter same passphrase again: <– 直接输入回车
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is: ……
[root@A root]# scp -p .ssh/id_rsa.pub root@机器B的IP:/root/.ssh/authorized_keys
root@192.168.3.206’s password: <– 输入机器B的root用户密码
root@192.168.3.206’s password: <– 输入机器B的root用户密码
[root@A root]# scp -p test root@机器B的IP地址:/root