Я пытаюсь получить доступ с Mac, а прокси-сервер и конечный сервер — Debian 10
Ключи были предоставлены, но запрос пароля все еще получен, пробовали и с сервера Linux, но запрос пароля все равно получен.
Проверено на сервере Windows с той же конфигурацией, все работает.
Код: Выделить всё
➜ ~ ssh dest-01 -v
OpenSSH_9.6p1, LibreSSL 3.3.6
debug1: Reading configuration data /Users/c.chandran/.ssh/config
debug1: /Users/xxxxx/.ssh/config line 7: Applying options for proxy-01
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Executing proxy command: exec ssh -W proxy-01:22 ops-01
debug1: identity file /Users/xxxxx/.ssh/id_rsa type 0
debug1: identity file /Users/xxxxx/.ssh/id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.6
[email protected]'s password:
➜ ~
Код: Выделить всё
➜ ~ cat .ssh/config
Host proxy-01
hostname 10.x.x.21
user root
IdentityFile ~/.ssh/id_rsa
ForwardAgent yes
Host dest-01
user root
IdentityFile ~/.ssh/id_rsa
ProxyCommand ssh -W %h:%p proxy-01
➜ ~
Код: Выделить всё
➜ ~ ssh -i .ssh/id_rsa -W dest-01:22 root@proxy-01 -v
OpenSSH_9.6p1, LibreSSL 3.3.6
debug1: Reading configuration data /Users/c.chandran/.ssh/config
debug1: /Users/xxxxxx/.ssh/config line 1: Applying options for ops-01
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to 10.x.x.21 [10.x.x.21] port 22.
debug1: Connection established.
debug1: identity file .ssh/id_rsa type 0
debug1: identity file .ssh/id_rsa-cert type -1
debug1: identity file /Users/c.chandran/.ssh/id_rsa type 0
debug1: identity file /Users/c.chandran/.ssh/id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.4p1 Debian-5+deb11u1
debug1: compat_banner: match: OpenSSH_8.4p1 Debian-5+deb11u1 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 10.x.x.21:22 as 'root'
debug1: load_hostkeys: fopen /Users/xxxxx/.ssh/known_hosts2: No such file or directory
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
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: [email protected] MAC: compression: none
debug1: kex: client->server cipher: [email protected] MAC: compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:kz1KTXarjthuyr8SrW0
debug1: load_hostkeys: fopen /Users/xxxx/.ssh/known_hosts2: No such file or directory
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
debug1: Host '10.x.x.21' is known and matches the ED25519 host key.
debug1: Found key in /Users/xxxx/.ssh/known_hosts:3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_ext_info_client_parse: server-sig-algs=
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: .ssh/id_rsa RSA SHA256:S+8QZlCgHD0As6iyOfWKrv3I explicit
debug1: Will attempt key: /Users/c.chandran/.ssh/id_rsa RSA SHA256:S+8QZlCgHDQI explicit
debug1: Offering public key: .ssh/id_rsa RSA SHA256:S+Krv3I explicit
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: /Users/c.chandran/.ssh/id_rsa RSA SHA256:S+8QZlCgHDQi9ME1IGlLL7NuXoE320As6iyOfWKrv3I explicit
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: password
[email protected]'s password:
➜ ~
Подробнее здесь: https://stackoverflow.com/questions/786 ... roxy-debia