qq_32037577
2018-03-03 10:25
采纳率: 16.7%
浏览 1.7k

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条回答 默认 最新

  • 唐玉尐宝 2018-03-03 10:33
    已采纳

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

    打赏 评论
  • kjs2007 2018-03-03 10:32

    #安装openssh -server

     sudo apt-get install openssh-server&&sudo apt-get install ssh
    
    打赏 评论
  • joinhandtowardsdusk 2018-03-04 01:52

    rsync -avzP ruanzhen1@172.16.1.31:(路径)

    打赏 评论

相关推荐 更多相似问题