3つのリモートシステムを介したrsync SSHエージェント配信は、単一のコマンドに対して機能しません。

3つのリモートシステムを介したrsync SSHエージェント配信は、単一のコマンドに対して機能しません。

私は次のことができます:

$local> ssh -A remote1
$remote1> rsync -e "ssh remote2 ssh " remote3:/file .
$remote1>

remote1これは、キーがremote2私のGNOMEキーリングにあり、パスワードを必要としないために機能しますremote3。しかし、次は失敗します。

$local> ssh -A remote1 "./scriptOnRemote1.sh"

scriptOnRemote1.shまったく同じrsyncコマンドを実行してください。次のエラーが発生します。

Permission denied, please try again.
ssh_askpass: exec(/usr/lib64/ssh/ssh-askpass): No such file or directory
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(235) [Receiver=3.1.0]

2 つのケースの詳細出力の違いは、次のように始まります。

pubkey_prepare: ssh_get_authentication_socket: No such file or directory

なぜこれが起こるのですか?

ベストアンサー1

ssh-agentRemote1ホストにログインして実行してください。

おすすめ記事