0

我试图在我的两台 EC2 服务器之间执行 scp/rsync 命令,但我得到的错误是低快照。

通常,当我ssh connect通过 PuTTY 访问我的服务器时,我需要附加一个私钥。所以我可以猜到该命令需要密钥。

如何在命令中添加密钥?

在此处输入图像描述

4

1 回答 1

2

man scp会显示一个选项-i

  -i identity_file
         Selects the file from which the identity (private key) for RSA authentication is read.  This option is directly passed to ssh(1).

由于该选项被传递给 ssh(如上所述),它可以被传递给rsync-e "ssh -i /path/to/private/key"

于 2013-05-03T08:55:26.527 回答