Cannot ssh into remote machine after rsync

為{幸葍}努か 提交于 2019-12-06 07:49:20

There are a couple things about the rsync command that bother me, but, I can't put my finger on the problem (if there is one).

  • the rsync command and subsequent ssh command reference different hosts: rsync(core@10.3.1.181:~/ ) and ssh to the host(core@10.3.1.151). Those are different machines, no?

  • the ~ in the target of the rsync command. core@10.3.1.181:~/. I am pretty sure that the ~/ references the core home directory, but, you could just get rid of the ~/ and replace that with a . (dot).

If you can reproduce the environment you did the copy in, you can add a --dry-run to the rsync command to see what it is going to do. Looking at this command I can't see it erasing the target's .ssh directory.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!