I reach a node via ssh in two steps. This is:
[carbajgu@fedora ~]$ ssh -i ./key.pem adouser@10.30.147.53
Activate the web console with: systemctl enable --now cockpit.socket
Last login: Sat Jan 7 00:25:11 2023 from 10.207.158.118
[adouser@ado-ocp ~]$ ssh -i ./key.pem centos@172.26.101.22
Last login: Sat Jan 7 00:29:43 2023 from 172.26.101.55
[centos@ztimecudm01adm001 ~]$
Notice, from my local pc (fedora) I connected to a remote host (ado-ocp) and then jump to (ztimecudm01adm001). This both connection use the same PEM
Base in an-ssh-tunnel-via-multiple-hops i made the command below:
[carbajgu@fedora ~]$ ssh -v -i ./key.pem -L 172.26.100.69:22:centos@172.26.101.22:22 adouser@10.30.147.53
OpenSSH_8.8p1, OpenSSL 3.0.5 5 Jul 2022
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: configuration requests final Match pass
debug1: re-parsing configuration
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug1: Connecting to 10.30.147.53 [10.30.147.53] port 22.
debug1: Connection established.
debug1: identity file ./key.pem type -1
debug1: identity file ./key.pem-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.8
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.0
debug1: compat_banner: match: OpenSSH_8.0 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 10.30.147.53:22 as 'adouser'
debug1: load_hostkeys: fopen /home/carbajgu/.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: aes256-gcm@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: aes256-gcm@openssh.com MAC: <implicit> compression: none
debug1: kex: curve25519-sha256 need=32 dh_need=32
debug1: kex: curve25519-sha256 need=32 dh_need=32
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:79sM1Etbib1G1zhEx9TzTXoCGw9ziLN1GxfQiWTGZKs
debug1: load_hostkeys: fopen /home/carbajgu/.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.30.147.53' is known and matches the ED25519 host key.
debug1: Found key in /home/carbajgu/.ssh/known_hosts:1
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 4294967296 blocks
debug1: Will attempt key: ./key.pem explicit
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug1: No credentials were supplied, or the credentials were unavailable or inaccessible
No Kerberos credentials available (default cache: KCM:)
debug1: No credentials were supplied, or the credentials were unavailable or inaccessible
No Kerberos credentials available (default cache: KCM:)
debug1: Next authentication method: publickey
debug1: Trying private key: ./key.pem
Authenticated to 10.30.147.53 ([10.30.147.53]:22) using "publickey".
debug1: pkcs11_del_provider: called, provider_id = (null)
debug1: Local connections to 172.26.100.69:22 forwarded to remote address centos@172.26.101.22:22
debug1: Local forwarding listening on 172.26.100.69 port 22.
bind [172.26.100.69]:22: Cannot assign requested address
channel_setup_fwd_listener_tcpip: cannot listen to port: 22
Could not request local forwarding.
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: filesystem full
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: client_input_hostkeys: searching /home/carbajgu/.ssh/known_hosts for 10.30.147.53 / (none)
debug1: client_input_hostkeys: searching /home/carbajgu/.ssh/known_hosts2 for 10.30.147.53 / (none)
debug1: client_input_hostkeys: hostkeys file /home/carbajgu/.ssh/known_hosts2 does not exist
debug1: Remote: /home/adouser/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: client_global_hostkeys_private_confirm: server used untrusted RSA signature algorithm ssh-rsa for key 0, disregarding
debug1: update_known_hosts: known hosts file /home/carbajgu/.ssh/known_hosts2 does not exist
Activate the web console with: systemctl enable --now cockpit.socket
Last login: Sat Jan 7 02:34:20 2023 from 10.30.147.53
[adouser@ado-ocp ~]$
The second jump failed, for some reason it is unable to find credentials.*
New contributor
Guillermo Carbajal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.