ログイン - >コンピューティングノードのProxyJumpにはまだパスワードが必要です。

ログイン - >コンピューティングノードのProxyJumpにはまだパスワードが必要です。

私のラップトップでCOMPUTEにsshを使用したいのですが、ログインする必要があり、COMPUTEとログインはユーザーを共有します(したがって、別のssh設定はありません)。

この質問は次のようになります。これ例外として、私の場合、サーバーはログイン/コンピューティング設定です。したがって、ユーザーアカウント/ユーザーディレクトリは、要塞(ログイン)とターゲット(コンピューティングノード)で同じです。 LAPTOPはCOMPUTEに直接SSHを介してアクセスできませんが、LOGINを介して行う必要があります。

LAPTOP --> [LOGIN --> COMPUTE]
|                        ^
+------------ X ---------+

(Windows) にはLAPTOP次の .ssh/config があります。

Host loginnode
    HostName login.company.org
    User bramvanroy
    IdentityFile ~/.ssh/mycompanykey

Host computenode
    HostName compute.company.org
    User bramvanroy
    IdentityFile ~/.ssh/mycompanykey
    ProxyJump loginnode

その上にはLOGIN以下のように独自の構成があります。

Host computenode
    HostName compute
    User bramvanroy
    ForwardAgent yes

権限:

  • authorized_keys:600
  • config: 644

実際には、パスワードなしでラップトップからSSH経由でログインできますが、試してもssh loginnodeパスワードssh computenodeを入力するように求められます。

なぜそんなことですか?この問題をどのように解決できますか?

また、私が知っている限り、ログイン/コンピューティング間で中間SSHキーを使用することはできません。どちらも同じアカウントと設定を使用するためです。


出力ssh -vvv computenode(実名/IPアドレスの相違):

OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug1: Reading configuration data config
debug1: config line 31: Applying options for computenode
debug3: Failed to open file:ssh_config error:2
debug1: Setting implicit ProxyCommand from ProxyJump: "C:\\Windows\\System32\\OpenSSH\\ssh.exe"  -vvv -W "[%h]:%p" loginnode
debug1: Executing proxy command: exec "C:\\Windows\\System32\\OpenSSH\\ssh.exe"  -vvv -W "[compute.company.org]:22" loginnode
debug3: spawning "C:\\Windows\\System32\\OpenSSH\\ssh.exe"  -vvv -W "[compute.company.org]:22" loginnode
debug3: w32_getpeername ERROR: not sock :2
debug3: Failed to open file:.ssh/loginnode.pub error:2
debug1: identity file loginnode type -1
debug3: Failed to open file:.ssh/loginnode-cert error:2
debug3: Failed to open file:.ssh/loginnode-cert.pub error:2
debug1: identity file loginnode-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug1: Reading configuration data config
debug1: config line 26: Applying options for loginnode
debug3: Failed to open file:ssh_config error:2
debug2: resolving "login.company.org" port 22
debug2: ssh_connect_direct
debug1: Connecting to loginnode REDACTED port 22.
debug1: Connection established.
debug3: Failed to open file:.ssh/loginnode.pub error:2
debug1: identity file loginnode type -1
debug3: Failed to open file:.ssh/loginnode-cert error:2
debug3: Failed to open file:.ssh/loginnode-cert.pub error:2
debug1: identity file loginnode-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.4
debug1: match: OpenSSH_7.4 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to login.company.org:22 as 'bramvanroy'
debug3: hostkeys_foreach: reading file "known_hosts"
debug3: record_hostkey: found key type ECDSA in file known_hosts:6
debug3: load_hostkeys: loaded 1 keys from login.company.org
debug3: Failed to open file:.ssh/known_hosts2 error:2
debug3: Failed to open file:ssh_known_hosts error:2
debug3: Failed to open file:ssh_known_hosts2 error:2
debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],[email protected],[email protected],ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: [email protected],diffie-hellman-group-exchange-sha256
debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: REDACTED
debug3: hostkeys_foreach: reading file "known_hosts"
debug3: record_hostkey: found key type ECDSA in file known_hosts:6
debug3: load_hostkeys: loaded 1 keys from login.company.org
debug3: Failed to open file:.ssh/known_hosts2 error:2
debug3: Failed to open file:ssh_known_hosts error:2
debug3: Failed to open file:ssh_known_hosts2 error:2
debug3: hostkeys_foreach: reading file "known_hosts"
debug3: record_hostkey: found key type ECDSA in file known_hosts:6
debug3: load_hostkeys: loaded 1 keys from REDACTED
debug3: Failed to open file:.ssh/known_hosts2 error:2
debug3: Failed to open file:ssh_known_hosts error:2
debug3: Failed to open file:ssh_known_hosts2 error:2
debug1: Host 'login.company.org' is known and matches the ECDSA host key.
debug1: Found key in known_hosts:6
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug3: unable to connect to pipe \\\\.\\pipe\\openssh-ssh-agent, error: 2
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: loginnode  explicit
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<rsa-sha2-256,rsa-sha2-512>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-interactive
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: loginnode
debug3: sign_and_send_pubkey: REDACTED
debug3: sign_and_send_pubkey: signing using rsa-sha2-512
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
Authenticated to login.company.org (REDACTED:22).
debug3: ssh_init_stdio_forwarding: compute.company.org:22
debug1: channel_connect_stdio_fwd compute.company.org:22
debug1: channel 0: new [stdio-forward]
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug3: w32_getsockname ERROR: bad fd: -1
debug3: w32_getpeername ERROR: bad fd: -1
debug3: w32_getpeername ERROR: bad fd: -1
debug1: getpeername failed: Bad file descriptor
debug3: send packet: type 90
debug2: fd 3 setting TCP_NODELAY
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 80
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 2097152 rmax 32768
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.7
debug1: match: OpenSSH_8.7 pat OpenSSH* compat 0x04000000
debug2: fd 5 setting O_NONBLOCK
debug2: fd 4 setting O_NONBLOCK
debug1: Authenticating to compute.company.org:22 as 'bramvanroy'
debug3: hostkeys_foreach: reading file "known_hosts"
debug3: record_hostkey: found key type ECDSA in file known_hosts:9
debug3: load_hostkeys: loaded 1 keys from compute.company.org
debug3: Failed to open file:.ssh/known_hosts2 error:2
debug3: Failed to open file:ssh_known_hosts error:2
debug3: Failed to open file:ssh_known_hosts2 error:2
debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],[email protected],[email protected],ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: [email protected],[email protected],aes256-ctr,[email protected],aes128-ctr
debug2: ciphers stoc: [email protected],[email protected],aes256-ctr,[email protected],aes128-ctr
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha1,[email protected],hmac-sha2-512
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha1,[email protected],hmac-sha2-512
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: REDACTED
debug3: hostkeys_foreach: reading file "known_hosts"
debug3: record_hostkey: found key type ECDSA in file known_hosts:9
debug3: load_hostkeys: loaded 1 keys from compute.company.org
debug3: Failed to open file:.ssh/known_hosts2 error:2
debug3: Failed to open file:ssh_known_hosts error:2
debug3: Failed to open file:ssh_known_hosts2 error:2
debug1: Host 'compute.company.org' is known and matches the ECDSA host key.
debug1: Found key in known_hosts:9
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug3: unable to connect to pipe \\\\.\\pipe\\openssh-ssh-agent, error: 2
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: loginnode  explicit
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected]>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-interactive
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: loginnode
debug3: sign_and_send_pubkey: REDACTED
debug3: sign_and_send_pubkey: signing using rsa-sha2-512
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password,keyboard-interactive
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug3: send packet: type 50
debug2: we sent a keyboard-interactive packet, wait for reply
debug3: receive packet: type 60
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
debug3: failed to open file:C:/dev/tty error:3
debug1: read_passphrase: can't open /dev/tty: No such file or directory

答え1

このデータダンプに表示される主な質問は次のとおりです。

debug1: rekey in after 134217728 blocks
debug3: unable to connect to pipe \\\\.\\pipe\\openssh-ssh-agent, error: 2
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: loginnode  explicit

SSHエージェントに再接続しようとしましたが、ソケットが存在しないようです。

エージェントが実行されていますか?

答え2

COMPUTEシステム管理者は、SELinuxパラメータが有効になっていないことが問題であることを知らせましたuse_nfs_home_dirs。有効にすると、すべてが期待どおりに機能します。

関連情報