ssh
디렉토리에 사용자 정의 구성이 있습니다 . -J
점프 매개변수를 전달할 때 ssh
사용자 정의 구성은 무시되고 대신 확인됩니다 ~/.ssh/config
.
이것은 어떻게 ProxyJump
작동합니까, 아니면 버그입니까?
이것아니요일하다:
ssh -vvv -F config -J [email protected] [email protected]
OpenSSH_9.3p1, OpenSSL 3.0.8 7 Feb 2023
debug1: Reading configuration data config
debug1: config line 1: Applying options for *
debug2: resolve_canonicalize: hostname 10.0.3.120 is address
debug1: Setting implicit ProxyCommand from ProxyJump: ssh -l jump -F config -vvv -W '[%h]:%p' 192.168.56.11
debug1: Executing proxy command: exec ssh -l jump -F config -vvv -W '[10.0.3.120]:22' 192.168.56.11
debug1: identity file /home/strboul/.ssh/id_rsa type 0
debug1: identity file /home/strboul/.ssh/id_rsa-cert type -1
debug1: identity file /home/strboul/.ssh/id_ecdsa type -1
debug1: identity file /home/strboul/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/strboul/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/strboul/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/strboul/.ssh/id_ed25519 type -1
debug1: identity file /home/strboul/.ssh/id_ed25519-cert type -1
debug1: identity file /home/strboul/.ssh/id_ed25519_sk type -1
debug1: identity file /home/strboul/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/strboul/.ssh/id_xmss type -1
debug1: identity file /home/strboul/.ssh/id_xmss-cert type -1
debug1: identity file /home/strboul/.ssh/id_dsa type -1
debug1: identity file /home/strboul/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.3
OpenSSH_9.3p1, OpenSSL 3.0.8 7 Feb 2023
debug1: Reading configuration data config
debug1: config line 1: Applying options for *
debug1: config line 9: Applying options for 192.168.56.11
debug2: resolve_canonicalize: hostname 192.168.56.11 is address
debug3: ssh_connect_direct: entering
debug1: Connecting to 192.168.56.11 [192.168.56.11] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: Connection established.
debug1: identity file id_ed25519-client_test type 3
debug1: identity file id_ed25519-client_test-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.7
debug1: compat_banner: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.7 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.56.11:22 as 'jump'
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug3: order_hostkeyalgs: no algorithms matched; accept original
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: [email protected],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,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
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-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,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: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
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: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:wUJgKzsnvmIfNKpldnCZEasb1RAvQV0B97Rr2zjRwvQ
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
Warning: Permanently added '192.168.56.11' (ED25519) to the list of known hosts.
debug3: send packet: type 21
debug2: ssh_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: ssh_set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug3: ssh_get_authentication_socket_path: path '/tmp/ssh-XXXXXXLePZAR/agent.15888'
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: id_ed25519-client_test ED25519 SHA256:1zzOdFQiBRu5EFHKIq1V0TfvYhHLGWNbaTyDn1m7giI 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]>
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,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: id_ed25519-client_test ED25519 SHA256:1zzOdFQiBRu5EFHKIq1V0TfvYhHLGWNbaTyDn1m7giI explicit
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: id_ed25519-client_test ED25519 SHA256:1zzOdFQiBRu5EFHKIq1V0TfvYhHLGWNbaTyDn1m7giI explicit
debug3: sign_and_send_pubkey: using publickey with ED25519 SHA256:1zzOdFQiBRu5EFHKIq1V0TfvYhHLGWNbaTyDn1m7giI
debug3: sign_and_send_pubkey: signing using ssh-ed25519 SHA256:1zzOdFQiBRu5EFHKIq1V0TfvYhHLGWNbaTyDn1m7giI
debug3: send packet: type 50
debug3: receive packet: type 52
Authenticated to 192.168.56.11 ([192.168.56.11]:22) using "publickey".
debug3: ssh_init_stdio_forwarding: 10.0.3.120:22
debug1: channel_connect_stdio_fwd: 10.0.3.120:22
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug1: channel 0: new stdio-forward [stdio-forward] (inactive timeout: 0)
debug3: fd 4 is O_NONBLOCK
debug3: fd 5 is O_NONBLOCK
debug1: getpeername failed: Bad file descriptor
debug3: send packet: type 90
debug2: fd 3 setting TCP_NODELAY
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: client_repledge: enter
debug1: pledge: fork
debug3: receive packet: type 80
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug3: receive packet: type 4
debug1: Remote: /etc/ssh/sshd_config.d/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 4
debug1: Remote: /etc/ssh/sshd_config.d/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
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.2p1 Ubuntu-4ubuntu0.7
debug1: compat_banner: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.7 pat OpenSSH* compat 0x04000000
debug2: fd 5 setting O_NONBLOCK
debug2: fd 4 setting O_NONBLOCK
debug1: Authenticating to 10.0.3.120:22 as 'service2'
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug3: order_hostkeyalgs: no algorithms matched; accept original
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: [email protected],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,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
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-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,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: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
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: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:AcrBUTeKSU89ylX1sz1NatDPp1i4HrLsIv5aXDCS0mE
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
Warning: Permanently added '10.0.3.120' (ED25519) to the list of known hosts.
debug3: send packet: type 21
debug2: ssh_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: ssh_set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug3: ssh_get_authentication_socket_path: path '/tmp/ssh-XXXXXXLePZAR/agent.15888'
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: /home/strboul/.ssh/id_rsa RSA SHA256:HaEGWnCwC3qIn7zKYwZ79E1Ts3d0zMLKWM9lhyW1pl8
debug1: Will attempt key: /home/strboul/.ssh/id_ecdsa
debug1: Will attempt key: /home/strboul/.ssh/id_ecdsa_sk
debug1: Will attempt key: /home/strboul/.ssh/id_ed25519
debug1: Will attempt key: /home/strboul/.ssh/id_ed25519_sk
debug1: Will attempt key: /home/strboul/.ssh/id_xmss
debug1: Will attempt key: /home/strboul/.ssh/id_dsa
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]>
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,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/strboul/.ssh/id_rsa RSA SHA256:HaEGWnCwC3qIn7zKYwZ79E1Ts3d0zMLKWM9lhyW1pl8
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,password
debug1: Trying private key: /home/strboul/.ssh/id_ecdsa
debug3: no such identity: /home/strboul/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/strboul/.ssh/id_ecdsa_sk
debug3: no such identity: /home/strboul/.ssh/id_ecdsa_sk: No such file or directory
debug1: Trying private key: /home/strboul/.ssh/id_ed25519
debug3: no such identity: /home/strboul/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: /home/strboul/.ssh/id_ed25519_sk
debug3: no such identity: /home/strboul/.ssh/id_ed25519_sk: No such file or directory
debug1: Trying private key: /home/strboul/.ssh/id_xmss
debug3: no such identity: /home/strboul/.ssh/id_xmss: No such file or directory
debug1: Trying private key: /home/strboul/.ssh/id_dsa
debug3: no such identity: /home/strboul/.ssh/id_dsa: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey,password).
debug3: send packet: type 1
debug1: channel 0: free: direct-tcpip: listening port 0 for 10.0.3.120 port 22, connect from 127.0.0.1 port 65535 to UNKNOWN port 65536, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 direct-tcpip: listening port 0 for 10.0.3.120 port 22, connect from 127.0.0.1 port 65535 to UNKNOWN port 65536 (t4 [stdio-forward] r0 i0/0 o0/0 e[closed]/0 fd 4/5/-1 sock -1 cc -1 io 0x01/0x00)
Killed by signal 1.
이것은 작동합니다:
ssh -vvv -F config -tt [email protected] ssh [email protected]
OpenSSH_9.3p1, OpenSSL 3.0.8 7 Feb 2023
debug1: Reading configuration data config
debug1: config line 1: Applying options for *
debug1: config line 9: Applying options for 192.168.56.11
debug2: resolve_canonicalize: hostname 192.168.56.11 is address
debug3: ssh_connect_direct: entering
debug1: Connecting to 192.168.56.11 [192.168.56.11] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: Connection established.
debug1: identity file id_ed25519-client_test type 3
debug1: identity file id_ed25519-client_test-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.7
debug1: compat_banner: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.7 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.56.11:22 as 'jump'
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug3: order_hostkeyalgs: no algorithms matched; accept original
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: [email protected],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,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256
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-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,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: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
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: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:wUJgKzsnvmIfNKpldnCZEasb1RAvQV0B97Rr2zjRwvQ
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
Warning: Permanently added '192.168.56.11' (ED25519) to the list of known hosts.
debug3: send packet: type 21
debug2: ssh_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: ssh_set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug3: ssh_get_authentication_socket_path: path '/tmp/ssh-XXXXXXLePZAR/agent.15888'
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: id_ed25519-client_test ED25519 SHA256:1zzOdFQiBRu5EFHKIq1V0TfvYhHLGWNbaTyDn1m7giI 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]>
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,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: id_ed25519-client_test ED25519 SHA256:1zzOdFQiBRu5EFHKIq1V0TfvYhHLGWNbaTyDn1m7giI explicit
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: id_ed25519-client_test ED25519 SHA256:1zzOdFQiBRu5EFHKIq1V0TfvYhHLGWNbaTyDn1m7giI explicit
debug3: sign_and_send_pubkey: using publickey with ED25519 SHA256:1zzOdFQiBRu5EFHKIq1V0TfvYhHLGWNbaTyDn1m7giI
debug3: sign_and_send_pubkey: signing using ssh-ed25519 SHA256:1zzOdFQiBRu5EFHKIq1V0TfvYhHLGWNbaTyDn1m7giI
debug3: send packet: type 50
debug3: receive packet: type 52
Authenticated to 192.168.56.11 ([192.168.56.11]:22) using "publickey".
debug1: channel 0: new session [client-session] (inactive timeout: 0)
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: client_repledge: enter
debug3: receive packet: type 80
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug3: receive packet: type 4
debug1: Remote: /etc/ssh/sshd_config.d/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 4
debug1: Remote: /etc/ssh/sshd_config.d/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: send packet: type 98
debug1: Sending command: ssh [email protected]
debug2: channel 0: request exec confirm 1
debug3: send packet: type 98
debug3: client_repledge: enter
debug1: pledge: fork
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: exec request accepted on channel 0
Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 5.4.0-149-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Last login: Tue May 30 11:09:04 2023 from 10.0.3.100
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
service2@service2:~$
디렉토리 내용:
config
id_ed25519-client_test
id_ed25519-client_test.pub
구성 파일:
Host *
PasswordAuthentication no
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
Host 192.168.56.11
IdentityFile id_ed25519-client_test
답변1
두 가지 방법은 동일하지 않으며 해석이 잘못된 것 같습니다.
로컬 컴퓨터에서 연결한 다음 실행하여 연결합니다. 두 번째 연결에서는 사용자가 사용할 수 있는 자격 증명과 구성을 사용합니다(로컬 구성은 이 연결과 관련이 없습니다). 두 연결 모두 성공했습니다.ssh … [email protected] ssh [email protected]
192.168.56.11
192.168.56.11
10.0.3.120
ssh [email protected]
192.168.56.11
jump
192.168.56.11
로컬 컴퓨터에서 다음으로 연결하십시오.ssh … -J [email protected] [email protected]
192.168.56.11
로컬 컴퓨터에서10.0.3.120
을 통해 전달된 패킷을 사용 합니다 192.168.56.11
. 두 번째 연결에서는 로컬 사용자가 사용할 수 있는 자격 증명과 구성을 사용합니다. 점프 호스트의 구성은 키와 아무 관련이 없으며 ssh
점프 호스트에서 실행 중인 프로세스가 없습니다. 각 연결은 로컬 컴퓨터에서 시작되며 로컬 구성이 포함됩니다. 이번이 두 번째 연결 실패다.
192.168.56.11
각각의 경우 로컬 시스템의 연결이 작동합니다. 귀하의 맞춤 구성이 무시되고 있다는 증거는 없습니다. 차이점은 다음에 일어나는 일입니다.
다음과 같습니다:
(아님
-J
) 해당 구성 및 자격 증명을 사용하여 로그인[email protected]
할 수 없습니다.[email protected]
(
-J
) 귀하의 로컬 계정을[email protected]
사용할 수 없습니다로컬 구성 및 로컬 자격 증명.
그게 차이점이에요.
게시한 구성 파일(로컬 구성 맞죠?)에는 에 대한 항목이 포함되어 있지만 192.168.56.11
에 대한 항목은 포함되어 있지 않습니다 10.0.3.120
. 로컬에서 연결할 때 동일한 ID 파일을 사용하려면 10.0.3.120
다음을 추가해야 합니다.
Host 10.0.3.120
IdentityFile id_ed25519-client_test
로컬 구성에.
참고 사항( 참조 man 5 ssh_config
): 각 매개변수에 대해 처음 얻은 값이 사용됩니다. 따라서 일반적으로 호스트별 선언은 파일 시작 부분에 배치하고 일반 기본값은 끝 부분에 배치해야 합니다. 당신 Host *
은 전에 그것을 가지고 있었 어요 Host 192.168.56.11
. 현재 구성에는 문제가 없습니다하지만Host *
, 그러나 구성을 추가로 사용자 정의하면 아래의 일부 줄이 아래의 일부 줄과 충돌하는 상황이 발생할 수 있으며 Host 192.168.56.11
, 그러면 아래 줄이 Host *
"승리"합니다(예). Host *
이 섹션을 끝으로 옮기는 것을 고려해 보세요 .