第一次、提示下载公钥
[root@rhel5 ~]# scp install.log root@192.168.124.129:/tmp
The authenticity of host '192.168.124.129 (192.168.124.129)' can't be established.
RSA key fingerprint is 6f:65:b6:80:62:4a:11:f3:03:21:36:ab:d9:f5:2b:1e.
Are you sure you want to continue connecting (yes/no)? yes //拿对方的锁加密数据 ,传过去后对方用钥匙就可以打开
Warning: Permanently added '192.168.124.129' (RSA) to the list of known hosts.
root@192.168.124.129's password:
install.log 100% 26KB 26.0KB/s 00:00
第二次、直接使用上次下载的公钥加密数据传输
[root@rhel5 ~]# scp log.tar.gz root@192.168.124.129:/tmp
root@192.168.124.129's password:
log.tar.gz 100% 9188 9.0KB/s 00:00
实现远程往回拽数据
[root@rhel5 ~]# scp root@192.168.124.129:/tmp/log.tar.gz ./