ジャンプホストはカスタムSSH設定を無視します。

ジャンプホストはカスタムSSH設定を無視します。

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

2つの方法は同じではなく、解釈が間違っているようです。

ローカルコンピュータから接続し、実行して接続します。 2番目の接続では、ユーザーが使用できる資格情報と構成を使用します(ローカル構成はこの接続には関係ありません)。どちらの接続も成功しました。ssh … [email protected] ssh [email protected]192.168.56.11192.168.56.1110.0.3.120ssh [email protected]192.168.56.11jump192.168.56.11

ローカルコンピュータで次に接続します。ssh … -J [email protected] [email protected]192.168.56.11ローカルコンピュータで10.0.3.120経由で転送されたパケットを使用します192.168.56.11。 2番目の接続では、ローカルユーザーが使用できる資格情報と構成を使用します。ジャンプホストの設定はキーとは無関係で、sshジャンプホストで実行されているプロセスはありません。各接続はローカルコンピュータで開始され、ローカル設定が含まれます。今回が2回目の接続失敗だ。

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.11Host *はい)。Host *このセクションを最後に移動することを検討してください。

おすすめ記事