centos linux 远程拷贝

scp -r /soft [email protected]:/

(/soft是要拷贝的目录,:直接和服务器挨着, :后的/是要拷贝的目录什么都不写就是根目录)

然后输入密码即可成功

--源服务器
[root@iZwz98z2q1jg4gnmgc88mqZ zookeeper]# scp -r  /usr/local/soft/tmp/zookeeper root@106.54.186.37:/usr/local/soft/tmp/zookeeper
The authenticity of host '106.54.186.37 (106.54.186.37)' can't be established.
ECDSA key fingerprint is SHA256:GVrFmdst+Z5MKGQ8Ty3rZ6Jf4xEL+H7Vrvu8UEZRLcw.
ECDSA key fingerprint is MD5:a0:2a:94:84:bf:9b:d3:cd:f6:2a:37:2b:c1:cf:51:67.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '106.54.186.37' (ECDSA) to the list of known hosts.
root@106.54.186.37's password: 
myid                                            
--目标服务器
[root@VM_0_3_centos bin]# cd /usr/local/soft/tmp/zookeeper
[root@VM_0_3_centos zookeeper]# ll
total 0
[root@VM_0_3_centos zookeeper]# ll
total 4
drwxr-xr-x 2 root root 4096 Apr 24 11:39 zookeeper
[root@VM_0_3_centos zookeeper]# cd zookeeper/
[root@VM_0_3_centos zookeeper]# ll
total 4
-rw-r--r-- 1 root root 2 Apr 24 11:39 myid

在,目标服务器上看到了要远程拷贝的东西,所以远程拷贝成功

猜你喜欢

转载自blog.csdn.net/qq_36912167/article/details/105727362