!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!两台Linux服务器在局域网之间传输文件!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

1.1 实验环境:

  服务器操作系统:CentOS6.7=192.168.24.37

  客户端操作系统:CentOS6.7=192.168.24.36

  虚拟机:VMware Workstation

1.2 实验背景

   从一台服务器上的文件远程复制到另一台服务器上的方法很多,今天在这里sky采用Linux scp命令来完成此任务。即从服务器端拷贝一份源码文件“mysql-5.6.20.tar.gz”到客户端下。

1.3 实验步骤

scp –r 远程用户名 @IP 地址 : 文件名  本地目录

[本地用户名 @IP 地址:] 可以不输入,需要输入远程用户名所对应的密码 。

[root@localhost tools]# scp -r [email protected]:/home/skyboy/tools/mysql-5.6.20.tar.gz  /usr/local/src/  

cp: cannot stat `root': No such file or directory

扫描二维码关注公众号,回复: 5981470 查看本文章

The authenticity of host '192.168.24.37(192.168.24.37)' can't be established.

RSA key fingerprint is 3b:99:9c:f4:0b:fc:17:ea:96:8a:47:f0:c1:0f:91:0a.

Are you sure you want to continue connecting (yes/no)?yes

Warning: Permanently added '192.168.24.37' (RSA) tothe list of known hosts.

[email protected]'s password:    

mysql-5.6.20.tar.gz   100% 5150KB   5.0MB/s   00:01 

小结:scp命令可以将本机文件复制到远程服务器上,也可以将远程服务器上的文件复制到本机,此实例的整个过程就是从一台Linux上的文件复制到本机Linux上。     

https://blog.51cto.com/sky9896/1682943

猜你喜欢

转载自blog.csdn.net/m0_37477061/article/details/89435002
今日推荐