linux电脑间的文件传输

一般在两台电脑间传输文件有FTP, SAMBA,MSTSC以及一些第三方的如飞鸽,飞秋等等,但这些都需要安装客户端,或者指定目录,用起来就没有那么方便了

如果在windows与linux之间,则SAMBA最好用

如果在linux与linux之间,则SCP最好用,scp基于ssh

[root@hding ntp]# scp crypto/pw [email protected]:/etc/ntp                     #把10.8.116.6电脑下的pw文件拷给10.8.116.111电脑上
The authenticity of host '10.8.116.111 (10.8.116.111)' can't be established.
RSA key fingerprint is 63:57:2f:55:ab:b6:ab:cf:10:7f:d9:f9:6d:5b:ae:6a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.8.116.111' (RSA) to the list of known hosts.
[email protected]'s password: 
pw                                       100%  620     0.6KB/s   00:00
反方向scp

[root@hding ntp]# scp [email protected]:/root/scp.txt .                       #把10.8.116.111下面的scp.txt文件拷贝到当前目录下
[email protected]'s password: 
scp.txt                                  100%    4     0.0KB/s   00:00    
[root@hding ntp]# ls
crypto                                   ntpservers
keys                                     pw
ntpkey_cert_hding.com                    scp.txt
ntpkey_host_hding.com                    step-tickers
ntpkey_RSA-MD5cert_hding.com.3187273346




你可能感兴趣的:(linux,scp)