로그인 -> 컴퓨팅 노드의 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. 활성화되면 이제 모든 것이 예상대로 작동합니다.

관련 정보