パスワードのない2段階リモートSSH

パスワードのない2段階リモートSSH

私はlocalhostからリモートサーバーに、そこからリモートコンピュータにsshを探しています。現在、リモートシステムとリモートサーバーの間でパスワードなしのSSHを有効にしていますが、localhostからサーバーにSSHを接続してからそこからシステムにSSHを試みると、次の結果が表示されます。

Enter passphrase for key '/home/user/.ssh/id_dsa': 
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).

リモートサーバーで開いている端末からリモートコンピュータにSSHを試みると、正常に動作します。私のモニターがそこにないものと関係がありますか:0.0、それともまったく違うのですか?試してみましたが、xhost +local:迷子になりました。

ありがとう

ベストアンサー1

両方のシステムにローカルシステムで使用される公開鍵がある場合-A

~からssh(1)

-A      Enables forwarding of the authentication agent connection.  This
        can also be specified on a per-host basis in a configuration file.

また、次の警告に注意してください。

        Agent forwarding should be enabled with caution.  Users with the
        ability to bypass file permissions on the remote host (for the
        agent's UNIX-domain socket) can access the local agent through the
        forwarded connection.  An attacker cannot obtain key material from
        the agent, however they can perform operations on the keys that
        enable them to authenticate using the identities loaded into the
        agent.

その結果、2番目のホストに対して認証すると、認証は実際に存在するホストに戻されます。

例:

me@host0:~ $ ssh -A host1
Last login: Thu Jun 14 11:31:53 2012 from 2001:db8::b0
me@host1:~ $ ssh -A host2
Last login: Thu Jun 14 11:41:05 2012 from 2001:db8::b1
me@host3:~ $ ssh -A host3
Last login: Tue Jun 12 10:46:50 2012 from 2001:db8::b2
me@host3:~ $ 

おすすめ記事