[root@nfs ~]# rsync -av -e 'ssh -p 22' root@10.64.64.224:/etc/hosts /tmp
The authenticity of host '10.64.64.224 (10.64.64.224)' can't be established.
ECDSA key fingerprint is SHA256:YkZGCHK6nbOgK+DytSWrG/WoJ12cVHZQYua0D8bjx6Y.
ECDSA key fingerprint is MD5:81:7d:63:ce:9e:d2:81:44:d1:a6:c7:c8:d0:02:82:5c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.64.64.224'(ECDSA) to the list of known hosts.
root@10.64.64.224's password:
receiving incremental file list
hosts
sent 43 bytes received 243 bytes 17.33 bytes/sec
total size is 158 speedup is 0.55
#第一次输入yes,然后输入密码
(2)利用(推送)模式从本地服务器/etc/hosts复制到远端主机的/tmp
[root@nfs ~]# rsync -av /etc/hosts root@10.64.64.224:/tmp
root@10.64.64.224's password:
sending incremental file list
sent 38 bytes received 12 bytes 11.11 bytes/sec
total size is 158 speedup is 3.16