1.本机到远程
[root@localhost /]# scp /home/hncl/file1 192.168.12.216:/tmp/abc The authenticity of host '192.168.12.216 (192.168.12.216)' can't be established. RSA key fingerprint is 29:d4:42:36:39:3a:b6:a5:55:52:15:d6:f8:d6:0d:c5. Are you sure you want to continue connecting (yes/no)? yew^Hs Please type 'yes' or 'no': yes Warning: Permanently added '192.168.12.216' (RSA) to the list of known hosts. root@192.168.12.216's password: file1 100% 36 0.0KB/s 00:00 [root@localhost /]#
2.远程到本机
[root@localhost /]# scp 192.168.12.216:/tmp/abc /home/hncl/file2 root@192.168.12.216's password: abc 100% 36 0.0KB/s 00:00 [root@localhost /]#
3.文件复制
只需在scp后加上-r参数即可
浙公网安备 33010602011771号