Linux ssh 连接问题 scp

[ruanzhen1@m01 ~]$ cat /etc/hosts
127.0.0.1 localhosts localhost.localdomain localhost4 localhost4.localdomain4
::1 localhosts localhost.localdomain localhost6 localhost6.localdomain6
172.16.1.5 lb01
172.16.1.6 lb02
172.16.1.7 web02
172.16.1.8 web01
172.16.1.51 db01 db01.etiantian.org
172.16.1.31 nfs01
172.16.1.41 backup
172.16.1.61 m01

[ruanzhen1@m01 ~]$ scp -P52112 hosts ruanzhen1@172.16.1.31:~
hosts: No such file or directory
改为[ruanzhen1@m01 ~]$ scp -P52112 ~/hosts ruanzhen1@172.16.1.31:~
仍然是hosts: No such file or directory
怎么解决啊?

3个回答

可以试试 scp -p /etc/hosts ruanzhen1@172.16.1.31:~

#安装openssh -server

 sudo apt-get install openssh-server&&sudo apt-get install ssh

rsync -avzP ruanzhen1@172.16.1.31:(路径)

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问