设有两机,两机可相互通讯无问题,中间无防火墙。
两机 IP 分别为:A:218.29.54.240 B:218.29.54.231
假设 A,B 机的 SSH 都允许 root 登陆
现在需要将 218.29.54.240 root 目录下的 cacti-0.8.7g.tar.gz 拷贝到 218.29.54.231 的 root 下
则登陆 218.29.54.240 使用

[root@hn ~]# scp cacti-0.8.7g.tar.gz root@218.29.54.231:/root/ The authenticity of host ‘218.29.54.231 (218.29.54.231)’ can’t be established. RSA key fingerprint is 4a:5c:48:b7:1c:17:3f:2c:60:b4:a2:65:b3:cb:fe:ff. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ‘218.29.54.231’ (RSA) to the list of known hosts. Address 218.29.54.231 maps to hn.kd.ny.adsl, but this does not map back to the address – POSSIBLE BREAK-IN ATTEMPT! root@218.29.54.231’s password:   这里输入 218.29.54.231 的 ssh 密码 cacti-0.8.7g.tar.gz                 100% 2184KB   2.1MB/s   00:00

登陆 218.29.54.231 验证

[root@hn ~]# ls anaconda-ks.cfg  cacti-0.8.7g.tar.gz  Desktop  install.log  install.log.syslog

如果 218.29.54.231 的 ssh 埠不是预设的话, 比如是 47457 则在 218.29.54.240 上

[root@hn ~]# scp -P 47457 cacti-0.8.7g.tar.gz root@218.29.54.231:/root/ Address 218.29.54.231 maps to hn.kd.ny.adsl, but this does not map back to the address – POSSIBLE BREAK-IN ATTEMPT! root@218.29.54.231’s password: cacti-0.8.7g.tar.gz                 100% 2184KB   2.1MB/s   00:00   

或者可以在 218.29.54.231 上使用

[root@hn ~]# scp root@218.29.54.240:/root/cacti-0.8.7g.tar.gz /root/ The authenticity of host ‘218.29.54.240 (218.29.54.240)’ can’t be established. RSA key fingerprint is 4a:5c:48:b7:1c:17:3f:2c:60:b4:a2:65:b3:cb:fe:ff. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ‘218.29.54.240’ (RSA) to the list of known hosts. Address 218.29.54.240 maps to hn.kd.ny.adsl, but this does not map back to the address – POSSIBLE BREAK-IN ATTEMPT! root@218.29.54.240’s password: cacti-0.8.7g.tar.gz                 100% 2184KB   2.1MB/s   00:00 [root@hn ~]# ls anaconda-ks.cfg  cacti-0.8.7g.tar.gz  Desktop  install.log  install.log.syslog