Is it possible to specify a different ssh port when using rsync?

后端 未结 8 2085
感动是毒
感动是毒 2020-12-12 08:44

I have been attempting the following command:

rsync -rvz --progress --remove-sent-files ./dir user@host:2222/path

SSH is running on port

8条回答
  •  天涯浪人
    2020-12-12 09:22

    I found this solution on Mike Hike Hostetler's site that worked perfectly for me.

    # rsync -avz -e "ssh -p $portNumber" user@remoteip:/path/to/files/ /local/path/
    

提交回复
热议问题