Answers:
我有需要PEM连接的目的地,并且它也有不同的SSH端口。这对我来说就像魅力一样工作:
例如,将文件夹(和子文件夹)从复制sourceserver
到targetserver
,在sourceserver
$ rsync -azu -e 'ssh -i ./pem_for_target_server.pem -p <port_number_for_target_server>' /folder/path/on/source username_on_target@target.server.name:/path/on/target/where/you/want/to/copy/folder/on/source/
(在你的情况下permissions are too open
为PEM文件,运行这个命令:
chmod 400 ./pem_for_target_server.pem
)