jbeverly / pam_ssh_agent_auth

Moving pam_ssh_agent_auth to github as primary development location
Other
98 stars 27 forks source link

[Bug] destination_constraints seem to break pam_ssh_agent_auth #44

Open hasechris opened 9 months ago

hasechris commented 9 months ago

Hi :-)

i wanted to use the "new" OpenSSH Feature destinatin_constraint to limit which keys are being tried in an ssh session with "sudo" in my ansible playbook. Sadly the passwordless sudo via pam_ssh_agent_auth seems to break if i want to use destination_constrains.

Not successfull scenario:

  1. I have a client (hostname is "chris-desktop-manjaro"). Im in the user homelab-automation.
  2. I load an ssh private key into an ssh-agent and
  3. connect per ssh to my remote server (hostname is "mgtsrv001.houseofnerds.it") into the remote user "chris".
  4. Then i want to become root with "sudo -i".

"successfull" scenario without pam_ssh_agent_auth:

  1. I have a client (hostname is "chris-desktop-manjaro"). Im in the user homelab-automation.
  2. I load an ssh private key into an ssh-agent and
  3. connect per ssh to my remote server (hostname is "mgtsrv001.houseofnerds.it") into the remote user "chris".
  4. Then i want to become root with "ssh root@mgtsrv001.houseofnerds.it". This is successfull.

The destination_constraint is in all tests ssh-add -h "mgtsrv001.houseofnerds.it" -h "mgtsrv001.houseofnerds.it>mgtsrv001.houseofnerds.it"

This seems to suggest that the destination_constraints seem to work ok, but sadly i dont know what problem pam_ssh_agent_auth seems to have with the destination_constraint. Additionally i also cant derive IF my destination_constraint is wrong for what i want to do because there are so little examples for the usage of destination_constraints.

/etc/pam.d/sudo-i

root@mgtsrv001:~# cat /etc/pam.d/sudo-i
#%PAM-1.0

# Set up user limits from /etc/security/limits.conf.
session    required   pam_limits.so
auth sufficient pam_ssh_agent_auth.so file=/root/.ssh/authorized_keys debug
@include common-auth
@include common-account
@include common-session
root@mgtsrv001:~# 

Debug Logs

Key Loading

[homelab-automation@chris-desktop-manjaro ~/homelab-automation]$ ssh-add -h "mgtsrv001.houseofnerds.it" -h "mgtsrv001.houseofnerds.it>mgtsrv001.houseofnerds.it"  ~/.ssh/mgtsrv001.houseofnerds.it 
Identity added: /home/homelab-automation/.ssh/mgtsrv001.houseofnerds.it (homelab-automation mgtsrv001.houseofnerds.it) 

debug1: new_socket: type = CONNECTION
debug2: fd 4 setting O_NONBLOCK
debug1: process_message: socket 1 (fd=4) type 25
debug2: process_add_identity: entering
debug1: parse_key_constraint_extension: constraint ext restrict-destination-v00@openssh.com
debug3: parse_dest_constraint: entering
debug3: parse_dest_constraint_hop: mgtsrv001.houseofnerds.it: adding key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug3: parse_dest_constraint_hop: mgtsrv001.houseofnerds.it: adding key RSA SHA256:olf2Zt8c+KroD7OSQ+99qCnyl6HVnnCtoYoPvK2ybRI
debug3: parse_dest_constraint_hop: mgtsrv001.houseofnerds.it: adding key ECDSA SHA256:z2P2DOhKd1+LuFYPSUVlk8ji/umDRFbUPgIcDcKd/Wg
debug2: parse_dest_constraint: parsed (ORIGIN) (0 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: parse_dest_constraint: entering
debug3: parse_dest_constraint_hop: mgtsrv001.houseofnerds.it: adding key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug3: parse_dest_constraint_hop: mgtsrv001.houseofnerds.it: adding key RSA SHA256:olf2Zt8c+KroD7OSQ+99qCnyl6HVnnCtoYoPvK2ybRI
debug3: parse_dest_constraint_hop: mgtsrv001.houseofnerds.it: adding key ECDSA SHA256:z2P2DOhKd1+LuFYPSUVlk8ji/umDRFbUPgIcDcKd/Wg
debug3: parse_dest_constraint_hop: mgtsrv001.houseofnerds.it: adding key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug3: parse_dest_constraint_hop: mgtsrv001.houseofnerds.it: adding key RSA SHA256:olf2Zt8c+KroD7OSQ+99qCnyl6HVnnCtoYoPvK2ybRI
debug3: parse_dest_constraint_hop: mgtsrv001.houseofnerds.it: adding key ECDSA SHA256:z2P2DOhKd1+LuFYPSUVlk8ji/umDRFbUPgIcDcKd/Wg
debug2: parse_dest_constraint: parsed mgtsrv001.houseofnerds.it (3 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug1: process_add_identity: add ssh-rsa SHA256:oT9QuQpMhnW3s1KgUwP1WaQEOq9Arc5cMPGb73YASSw "homelab-automation mgtsrv001.houseofnerds.it" (life: 0) (confirm: 0) (provider: none) (destination constraints: 2)

Scenario 1

SSH Log

[homelab-automation@chris-desktop-manjaro ~/homelab-automation]$ ssh -A -vvv chris@mgtsrv001.houseofnerds.it
OpenSSH_9.4p1, OpenSSL 3.1.2 1 Aug 2023
debug1: Reading configuration data /home/homelab-automation/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 2: include /etc/ssh/ssh_config.d/*.conf matched no files
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/homelab-automation/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/homelab-automation/.ssh/known_hosts2'
debug2: resolving "mgtsrv001.houseofnerds.it" port 22
debug3: resolve_host: lookup mgtsrv001.houseofnerds.it:22
debug3: ssh_connect_direct: entering
debug1: Connecting to mgtsrv001.houseofnerds.it [192.168.42.25] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: Connection established.
debug1: identity file /home/homelab-automation/.ssh/id_rsa type -1
debug1: identity file /home/homelab-automation/.ssh/id_rsa-cert type -1
debug1: identity file /home/homelab-automation/.ssh/id_ecdsa type -1
debug1: identity file /home/homelab-automation/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/homelab-automation/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/homelab-automation/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/homelab-automation/.ssh/id_ed25519 type -1
debug1: identity file /home/homelab-automation/.ssh/id_ed25519-cert type -1
debug1: identity file /home/homelab-automation/.ssh/id_ed25519_sk type -1
debug1: identity file /home/homelab-automation/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/homelab-automation/.ssh/id_xmss type -1
debug1: identity file /home/homelab-automation/.ssh/id_xmss-cert type -1
debug1: identity file /home/homelab-automation/.ssh/id_dsa type -1
debug1: identity file /home/homelab-automation/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_9.2p1 Debian-2
debug1: compat_banner: match: OpenSSH_9.2p1 Debian-2 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to mgtsrv001.houseofnerds.it:22 as 'chris'
debug3: record_hostkey: found key type ED25519 in file /home/homelab-automation/.ssh/known_hosts:2
debug3: record_hostkey: found key type RSA in file /home/homelab-automation/.ssh/known_hosts:3
debug3: record_hostkey: found key type ECDSA in file /home/homelab-automation/.ssh/known_hosts:4
debug3: load_hostkeys_file: loaded 3 keys from mgtsrv001.houseofnerds.it
debug1: load_hostkeys: fopen /home/homelab-automation/.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
debug3: order_hostkeyalgs: have matching best-preference key type ssh-ed25519-cert-v01@openssh.com, using HostkeyAlgorithms verbatim
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: sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,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: ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,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,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug1: kex: algorithm: sntrup761x25519-sha512@openssh.com
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com 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:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug3: record_hostkey: found key type ED25519 in file /home/homelab-automation/.ssh/known_hosts:2
debug3: record_hostkey: found key type RSA in file /home/homelab-automation/.ssh/known_hosts:3
debug3: record_hostkey: found key type ECDSA in file /home/homelab-automation/.ssh/known_hosts:4
debug3: load_hostkeys_file: loaded 3 keys from mgtsrv001.houseofnerds.it
debug1: load_hostkeys: fopen /home/homelab-automation/.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 'mgtsrv001.houseofnerds.it' is known and matches the ED25519 host key.
debug1: Found key in /home/homelab-automation/.ssh/known_hosts:2
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/homelab-automation_ssh.socket'
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: agent returned 1 keys
debug1: Will attempt key: homelab-automation mgtsrv001.houseofnerds.it RSA SHA256:oT9QuQpMhnW3s1KgUwP1WaQEOq9Arc5cMPGb73YASSw agent
debug1: Will attempt key: /home/homelab-automation/.ssh/id_rsa 
debug1: Will attempt key: /home/homelab-automation/.ssh/id_ecdsa 
debug1: Will attempt key: /home/homelab-automation/.ssh/id_ecdsa_sk 
debug1: Will attempt key: /home/homelab-automation/.ssh/id_ed25519 
debug1: Will attempt key: /home/homelab-automation/.ssh/id_ed25519_sk 
debug1: Will attempt key: /home/homelab-automation/.ssh/id_xmss 
debug1: Will attempt key: /home/homelab-automation/.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,sk-ssh-ed25519@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com,ssh-dss,ssh-rsa,rsa-sha2-256,rsa-sha2-512>
debug1: kex_input_ext_info: publickey-hostbound@openssh.com=<0>
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,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: homelab-automation mgtsrv001.houseofnerds.it RSA SHA256:oT9QuQpMhnW3s1KgUwP1WaQEOq9Arc5cMPGb73YASSw agent
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: homelab-automation mgtsrv001.houseofnerds.it RSA SHA256:oT9QuQpMhnW3s1KgUwP1WaQEOq9Arc5cMPGb73YASSw agent
debug3: sign_and_send_pubkey: using publickey-hostbound-v00@openssh.com with RSA SHA256:oT9QuQpMhnW3s1KgUwP1WaQEOq9Arc5cMPGb73YASSw
debug3: sign_and_send_pubkey: signing using rsa-sha2-512 SHA256:oT9QuQpMhnW3s1KgUwP1WaQEOq9Arc5cMPGb73YASSw
debug3: send packet: type 50
debug3: receive packet: type 52
Authenticated to mgtsrv001.houseofnerds.it ([192.168.42.25]: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 no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: filesystem
debug3: client_repledge: enter
debug3: receive packet: type 80
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug3: client_input_hostkeys: received RSA key SHA256:olf2Zt8c+KroD7OSQ+99qCnyl6HVnnCtoYoPvK2ybRI
debug3: client_input_hostkeys: received ECDSA key SHA256:z2P2DOhKd1+LuFYPSUVlk8ji/umDRFbUPgIcDcKd/Wg
debug3: client_input_hostkeys: received ED25519 key SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug1: client_input_hostkeys: searching /home/homelab-automation/.ssh/known_hosts for mgtsrv001.houseofnerds.it / (none)
debug3: hostkeys_foreach: reading file "/home/homelab-automation/.ssh/known_hosts"
debug3: hostkeys_find: found ssh-ed25519 key at /home/homelab-automation/.ssh/known_hosts:2
debug3: hostkeys_find: found ssh-rsa key at /home/homelab-automation/.ssh/known_hosts:3
debug3: hostkeys_find: found ecdsa-sha2-nistp256 key at /home/homelab-automation/.ssh/known_hosts:4
debug1: client_input_hostkeys: searching /home/homelab-automation/.ssh/known_hosts2 for mgtsrv001.houseofnerds.it / (none)
debug1: client_input_hostkeys: hostkeys file /home/homelab-automation/.ssh/known_hosts2 does not exist
debug3: client_input_hostkeys: 3 server keys: 0 new, 3 retained, 0 incomplete match. 0 to remove
debug1: client_input_hostkeys: no new or deprecated keys from server
debug3: client_repledge: enter
debug3: receive packet: type 4
debug1: Remote: /home/chris/.ssh/authorized_keys:4: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 4
debug1: Remote: /home/chris/.ssh/authorized_keys:4: 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
debug3: ssh_get_authentication_socket_path: path '/tmp/homelab-automation_ssh.socket'
debug1: Requesting authentication agent forwarding.
debug2: channel 0: request auth-agent-req@openssh.com confirm 0
debug3: send packet: type 98
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
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug3: client_repledge: enter
debug1: pledge: agent
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: shell request accepted on channel 0
Linux mgtsrv001 6.2.16-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.2.16-7 (2023-08-01T11:23Z) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Oct 15 12:41:58 2023 from 10.10.10.21
chris@mgtsrv001:~$ sudo -i
debug3: receive packet: type 90
debug1: client_input_channel_open: ctype auth-agent@openssh.com rchan 2 win 65536 max 16384
debug3: ssh_get_authentication_socket_path: path '/tmp/homelab-automation_ssh.socket'
debug1: client_request_agent: bound agent to hostkey
debug2: fd 7 setting O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new authentication agent connection [authentication agent connection] (inactive timeout: 0)
debug1: confirm auth-agent@openssh.com
debug3: send packet: type 91
debug3: receive packet: type 96
debug2: channel 1: rcvd eof
debug2: channel 1: output open -> drain
debug2: channel 1: obuf empty
debug2: chan_shutdown_write: channel 1: (i0 o1 sock 7 wfd 7 efd -1 [closed])
debug2: channel 1: output drain -> closed
debug1: channel 1: FORCE input drain
debug2: channel 1: ibuf empty
debug2: channel 1: send eof
debug3: send packet: type 96
debug2: channel 1: input drain -> closed
debug2: channel 1: send close
debug3: send packet: type 97
debug3: channel 1: will not send data after close
debug3: receive packet: type 97
debug2: channel 1: rcvd close
debug3: channel 1: will not send data after close
debug2: channel 1: is dead
debug2: channel 1: garbage collecting
debug1: channel 1: free: authentication agent connection, nchannels 2
debug3: channel 1: status: The following connections are open:
  #0 client-session (t4 [session] r0 i0/0 o0/0 e[write]/0 fd 4/5/6 sock -1 cc -1 io 0x01/0x00)
  #1 authentication agent connection (t4 [authentication agent connection] r2 i3/0 o3/0 e[closed]/0 fd 7/7/-1 sock 7 cc -1 io 0x00/0x00)

[sudo] Passwort für chris: debug3: receive packet: type 2
debug3: Received SSH2_MSG_IGNORE

sudo: Ein Passwort ist notwendig
chris@mgtsrv001:~$ 

SSH Agent

debug1: new_socket: type = CONNECTION
debug2: fd 4 setting O_NONBLOCK
debug1: process_message: socket 1 (fd=4) type 27
debug2: process_extension: entering
debug2: process_ext_session_bind: entering
debug1: process_ext_session_bind: recorded ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA (slot 0 of 16)
debug1: process_message: socket 1 (fd=4) type 11
debug2: process_request_identities: entering
debug3: identity_permitted: entering: key RSA comment "homelab-automation mgtsrv001.houseofnerds.it", 1 socket bindings, 2 constraints
debug3: identity_permitted: socketentry fd=4, entry 0 AUTH, from hostkey (ORIGIN)  to user (ANY) hostkey ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: constraint 0 (ORIGIN) (0 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: to: entering hostname mgtsrv001.houseofnerds.it, requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 3 keys avail
debug3: match_key_hop: to: key 0: ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: allowed for hostname mgtsrv001.houseofnerds.it
debug2: process_request_identities: replying with 1 allowed of 1 available keys
debug1: process_message: socket 1 (fd=4) type 13
debug1: process_sign_request2: entering
debug3: parse_userauth_request: well formed userauth
debug1: process_sign_request2: user=chris
debug3: identity_permitted: entering: key RSA comment "homelab-automation mgtsrv001.houseofnerds.it", 1 socket bindings, 2 constraints
debug3: identity_permitted: socketentry fd=4, entry 0 AUTH, from hostkey (ORIGIN)  to user chris hostkey ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: constraint 0 (ORIGIN) (0 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: to: entering hostname mgtsrv001.houseofnerds.it, requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 3 keys avail
debug3: match_key_hop: to: key 0: ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: allowed for hostname mgtsrv001.houseofnerds.it
debug1: process_sign_request2: good signature
debug1: new_socket: type = CONNECTION
debug2: fd 4 setting O_NONBLOCK
debug1: new_socket: type = CONNECTION
debug2: fd 4 setting O_NONBLOCK
debug1: process_message: socket 1 (fd=4) type 27
debug2: process_extension: entering
debug2: process_ext_session_bind: entering
debug1: process_ext_session_bind: recorded ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA (slot 0 of 16)
debug1: process_message: socket 1 (fd=4) type 11
debug2: process_request_identities: entering
debug3: identity_permitted: entering: key RSA comment "homelab-automation mgtsrv001.houseofnerds.it", 1 socket bindings, 2 constraints
debug3: identity_permitted: socketentry fd=4, entry 0 FORWARD, from hostkey (ORIGIN)  to user (ANY) hostkey ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: constraint 0 (ORIGIN) (0 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: to: entering hostname mgtsrv001.houseofnerds.it, requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 3 keys avail
debug3: match_key_hop: to: key 0: ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: allowed for hostname mgtsrv001.houseofnerds.it
debug2: permitted_by_dest_constraints: constraint 0 (ORIGIN) (0 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: from: entering hostname (ORIGIN), requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 0 keys avail
debug2: permitted_by_dest_constraints: constraint 1 mgtsrv001.houseofnerds.it (3 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: from: entering hostname mgtsrv001.houseofnerds.it, requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 3 keys avail
debug3: match_key_hop: from: key 0: ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: allowed for hostname mgtsrv001.houseofnerds.it
debug2: process_request_identities: replying with 1 allowed of 1 available keys
debug1: process_message: socket 1 (fd=4) type 13
debug1: process_sign_request2: entering
process_sign_request2: refusing use of destination-constrained key to sign an unidentified signature

Scenario 2

SSH Log

[homelab-automation@chris-desktop-manjaro ~/homelab-automation]$ ssh -A -vvv chris@mgtsrv001.houseofnerds.it
OpenSSH_9.4p1, OpenSSL 3.1.2 1 Aug 2023
debug1: Reading configuration data /home/homelab-automation/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 2: include /etc/ssh/ssh_config.d/*.conf matched no files
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/homelab-automation/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/homelab-automation/.ssh/known_hosts2'
debug2: resolving "mgtsrv001.houseofnerds.it" port 22
debug3: resolve_host: lookup mgtsrv001.houseofnerds.it:22
debug3: ssh_connect_direct: entering
debug1: Connecting to mgtsrv001.houseofnerds.it [192.168.42.25] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: Connection established.
debug1: identity file /home/homelab-automation/.ssh/id_rsa type -1
debug1: identity file /home/homelab-automation/.ssh/id_rsa-cert type -1
debug1: identity file /home/homelab-automation/.ssh/id_ecdsa type -1
debug1: identity file /home/homelab-automation/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/homelab-automation/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/homelab-automation/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/homelab-automation/.ssh/id_ed25519 type -1
debug1: identity file /home/homelab-automation/.ssh/id_ed25519-cert type -1
debug1: identity file /home/homelab-automation/.ssh/id_ed25519_sk type -1
debug1: identity file /home/homelab-automation/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/homelab-automation/.ssh/id_xmss type -1
debug1: identity file /home/homelab-automation/.ssh/id_xmss-cert type -1
debug1: identity file /home/homelab-automation/.ssh/id_dsa type -1
debug1: identity file /home/homelab-automation/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_9.2p1 Debian-2
debug1: compat_banner: match: OpenSSH_9.2p1 Debian-2 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to mgtsrv001.houseofnerds.it:22 as 'chris'
debug3: record_hostkey: found key type ED25519 in file /home/homelab-automation/.ssh/known_hosts:2
debug3: record_hostkey: found key type RSA in file /home/homelab-automation/.ssh/known_hosts:3
debug3: record_hostkey: found key type ECDSA in file /home/homelab-automation/.ssh/known_hosts:4
debug3: load_hostkeys_file: loaded 3 keys from mgtsrv001.houseofnerds.it
debug1: load_hostkeys: fopen /home/homelab-automation/.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
debug3: order_hostkeyalgs: have matching best-preference key type ssh-ed25519-cert-v01@openssh.com, using HostkeyAlgorithms verbatim
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: sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,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: ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,rsa-sha2-512,rsa-sha2-256
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org,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,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos: 
debug2: languages stoc: 
debug2: first_kex_follows 0 
debug2: reserved 0 
debug1: kex: algorithm: sntrup761x25519-sha512@openssh.com
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com 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:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug3: record_hostkey: found key type ED25519 in file /home/homelab-automation/.ssh/known_hosts:2
debug3: record_hostkey: found key type RSA in file /home/homelab-automation/.ssh/known_hosts:3
debug3: record_hostkey: found key type ECDSA in file /home/homelab-automation/.ssh/known_hosts:4
debug3: load_hostkeys_file: loaded 3 keys from mgtsrv001.houseofnerds.it
debug1: load_hostkeys: fopen /home/homelab-automation/.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 'mgtsrv001.houseofnerds.it' is known and matches the ED25519 host key.
debug1: Found key in /home/homelab-automation/.ssh/known_hosts:2
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/homelab-automation_ssh.socket'
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: agent returned 1 keys
debug1: Will attempt key: homelab-automation mgtsrv001.houseofnerds.it RSA SHA256:oT9QuQpMhnW3s1KgUwP1WaQEOq9Arc5cMPGb73YASSw agent
debug1: Will attempt key: /home/homelab-automation/.ssh/id_rsa 
debug1: Will attempt key: /home/homelab-automation/.ssh/id_ecdsa 
debug1: Will attempt key: /home/homelab-automation/.ssh/id_ecdsa_sk 
debug1: Will attempt key: /home/homelab-automation/.ssh/id_ed25519 
debug1: Will attempt key: /home/homelab-automation/.ssh/id_ed25519_sk 
debug1: Will attempt key: /home/homelab-automation/.ssh/id_xmss 
debug1: Will attempt key: /home/homelab-automation/.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,sk-ssh-ed25519@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com,ssh-dss,ssh-rsa,rsa-sha2-256,rsa-sha2-512>
debug1: kex_input_ext_info: publickey-hostbound@openssh.com=<0>
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,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: homelab-automation mgtsrv001.houseofnerds.it RSA SHA256:oT9QuQpMhnW3s1KgUwP1WaQEOq9Arc5cMPGb73YASSw agent
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: homelab-automation mgtsrv001.houseofnerds.it RSA SHA256:oT9QuQpMhnW3s1KgUwP1WaQEOq9Arc5cMPGb73YASSw agent
debug3: sign_and_send_pubkey: using publickey-hostbound-v00@openssh.com with RSA SHA256:oT9QuQpMhnW3s1KgUwP1WaQEOq9Arc5cMPGb73YASSw
debug3: sign_and_send_pubkey: signing using rsa-sha2-512 SHA256:oT9QuQpMhnW3s1KgUwP1WaQEOq9Arc5cMPGb73YASSw
debug3: send packet: type 50
debug3: receive packet: type 52
Authenticated to mgtsrv001.houseofnerds.it ([192.168.42.25]: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 no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: filesystem
debug3: client_repledge: enter
debug3: receive packet: type 80
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug3: client_input_hostkeys: received RSA key SHA256:olf2Zt8c+KroD7OSQ+99qCnyl6HVnnCtoYoPvK2ybRI
debug3: client_input_hostkeys: received ECDSA key SHA256:z2P2DOhKd1+LuFYPSUVlk8ji/umDRFbUPgIcDcKd/Wg
debug3: client_input_hostkeys: received ED25519 key SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug1: client_input_hostkeys: searching /home/homelab-automation/.ssh/known_hosts for mgtsrv001.houseofnerds.it / (none)
debug3: hostkeys_foreach: reading file "/home/homelab-automation/.ssh/known_hosts"
debug3: hostkeys_find: found ssh-ed25519 key at /home/homelab-automation/.ssh/known_hosts:2
debug3: hostkeys_find: found ssh-rsa key at /home/homelab-automation/.ssh/known_hosts:3
debug3: hostkeys_find: found ecdsa-sha2-nistp256 key at /home/homelab-automation/.ssh/known_hosts:4
debug1: client_input_hostkeys: searching /home/homelab-automation/.ssh/known_hosts2 for mgtsrv001.houseofnerds.it / (none)
debug1: client_input_hostkeys: hostkeys file /home/homelab-automation/.ssh/known_hosts2 does not exist
debug3: client_input_hostkeys: 3 server keys: 0 new, 3 retained, 0 incomplete match. 0 to remove
debug1: client_input_hostkeys: no new or deprecated keys from server
debug3: client_repledge: enter
debug3: receive packet: type 4
debug1: Remote: /home/chris/.ssh/authorized_keys:4: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 4
debug1: Remote: /home/chris/.ssh/authorized_keys:4: 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
debug3: ssh_get_authentication_socket_path: path '/tmp/homelab-automation_ssh.socket'
debug1: Requesting authentication agent forwarding.
debug2: channel 0: request auth-agent-req@openssh.com confirm 0
debug3: send packet: type 98
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
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug3: client_repledge: enter
debug1: pledge: agent
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: shell request accepted on channel 0
Linux mgtsrv001 6.2.16-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.2.16-7 (2023-08-01T11:23Z) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Oct 15 12:57:07 2023 from 10.10.10.21
chris@mgtsrv001:~$ ssh root@mgtsrv001.houseofnerds.it
debug3: receive packet: type 90
debug1: client_input_channel_open: ctype auth-agent@openssh.com rchan 2 win 65536 max 16384
debug3: ssh_get_authentication_socket_path: path '/tmp/homelab-automation_ssh.socket'
debug1: client_request_agent: bound agent to hostkey
debug2: fd 7 setting O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new authentication agent connection [authentication agent connection] (inactive timeout: 0)
debug1: confirm auth-agent@openssh.com
debug3: send packet: type 91
debug3: receive packet: type 96
debug2: channel 1: rcvd eof
debug2: channel 1: output open -> drain
debug2: channel 1: obuf empty
debug2: chan_shutdown_write: channel 1: (i0 o1 sock 7 wfd 7 efd -1 [closed])
debug2: channel 1: output drain -> closed
debug1: channel 1: FORCE input drain
debug2: channel 1: ibuf empty
debug2: channel 1: send eof
debug3: send packet: type 96
debug2: channel 1: input drain -> closed
debug2: channel 1: send close
debug3: send packet: type 97
debug3: channel 1: will not send data after close
debug3: receive packet: type 97
debug2: channel 1: rcvd close
debug3: channel 1: will not send data after close
debug2: channel 1: is dead
debug2: channel 1: garbage collecting
debug1: channel 1: free: authentication agent connection, nchannels 2
debug3: channel 1: status: The following connections are open:
  #0 client-session (t4 [session] r0 i0/0 o0/0 e[write]/0 fd 4/5/6 sock -1 cc -1 io 0x01/0x00)
  #1 authentication agent connection (t4 [authentication agent connection] r2 i3/0 o3/0 e[closed]/0 fd 7/7/-1 sock 7 cc -1 io 0x00/0x00)

Linux mgtsrv001 6.2.16-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.2.16-7 (2023-08-01T11:23Z) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Oct 15 12:57:25 2023 from 192.168.42.25
root@mgtsrv001:~# 

SSH Agent

debug1: new_socket: type = CONNECTION
debug2: fd 4 setting O_NONBLOCK
debug1: process_message: socket 1 (fd=4) type 27
debug2: process_extension: entering
debug2: process_ext_session_bind: entering
debug1: process_ext_session_bind: recorded ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA (slot 0 of 16)
debug1: process_message: socket 1 (fd=4) type 11
debug2: process_request_identities: entering
debug3: identity_permitted: entering: key RSA comment "homelab-automation mgtsrv001.houseofnerds.it", 1 socket bindings, 2 constraints
debug3: identity_permitted: socketentry fd=4, entry 0 AUTH, from hostkey (ORIGIN)  to user (ANY) hostkey ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: constraint 0 (ORIGIN) (0 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: to: entering hostname mgtsrv001.houseofnerds.it, requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 3 keys avail
debug3: match_key_hop: to: key 0: ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: allowed for hostname mgtsrv001.houseofnerds.it
debug2: process_request_identities: replying with 1 allowed of 1 available keys
debug1: process_message: socket 1 (fd=4) type 13
debug1: process_sign_request2: entering
debug3: parse_userauth_request: well formed userauth
debug1: process_sign_request2: user=chris
debug3: identity_permitted: entering: key RSA comment "homelab-automation mgtsrv001.houseofnerds.it", 1 socket bindings, 2 constraints
debug3: identity_permitted: socketentry fd=4, entry 0 AUTH, from hostkey (ORIGIN)  to user chris hostkey ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: constraint 0 (ORIGIN) (0 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: to: entering hostname mgtsrv001.houseofnerds.it, requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 3 keys avail
debug3: match_key_hop: to: key 0: ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: allowed for hostname mgtsrv001.houseofnerds.it
debug1: process_sign_request2: good signature
debug1: new_socket: type = CONNECTION
debug2: fd 4 setting O_NONBLOCK
debug1: new_socket: type = CONNECTION
debug2: fd 4 setting O_NONBLOCK
debug1: process_message: socket 1 (fd=4) type 27
debug2: process_extension: entering
debug2: process_ext_session_bind: entering
debug1: process_ext_session_bind: recorded ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA (slot 0 of 16)
debug1: process_message: socket 1 (fd=4) type 27
debug2: process_extension: entering
debug2: process_ext_session_bind: entering
debug1: process_ext_session_bind: recorded ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA (slot 1 of 16)
debug1: process_message: socket 1 (fd=4) type 11
debug2: process_request_identities: entering
debug3: identity_permitted: entering: key RSA comment "homelab-automation mgtsrv001.houseofnerds.it", 2 socket bindings, 2 constraints
debug3: identity_permitted: socketentry fd=4, entry 0 FORWARD, from hostkey (ORIGIN)  to user (ANY) hostkey ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: constraint 0 (ORIGIN) (0 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: to: entering hostname mgtsrv001.houseofnerds.it, requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 3 keys avail
debug3: match_key_hop: to: key 0: ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: allowed for hostname mgtsrv001.houseofnerds.it
debug3: identity_permitted: socketentry fd=4, entry 1 AUTH, from hostkey ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA to user (ANY) hostkey ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: constraint 0 (ORIGIN) (0 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: from: entering hostname (ORIGIN), requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 0 keys avail
debug2: permitted_by_dest_constraints: constraint 1 mgtsrv001.houseofnerds.it (3 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: from: entering hostname mgtsrv001.houseofnerds.it, requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 3 keys avail
debug3: match_key_hop: from: key 0: ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug3: match_key_hop: to: entering hostname mgtsrv001.houseofnerds.it, requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 3 keys avail
debug3: match_key_hop: to: key 0: ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: allowed for hostname mgtsrv001.houseofnerds.it
debug2: process_request_identities: replying with 1 allowed of 1 available keys
debug1: process_message: socket 1 (fd=4) type 13
debug1: process_sign_request2: entering
debug3: parse_userauth_request: well formed userauth
debug1: process_sign_request2: user=root
debug3: identity_permitted: entering: key RSA comment "homelab-automation mgtsrv001.houseofnerds.it", 2 socket bindings, 2 constraints
debug3: identity_permitted: socketentry fd=4, entry 0 FORWARD, from hostkey (ORIGIN)  to user root hostkey ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: constraint 0 (ORIGIN) (0 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: to: entering hostname mgtsrv001.houseofnerds.it, requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 3 keys avail
debug3: match_key_hop: to: key 0: ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: allowed for hostname mgtsrv001.houseofnerds.it
debug3: identity_permitted: socketentry fd=4, entry 1 AUTH, from hostkey ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA to user root hostkey ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: constraint 0 (ORIGIN) (0 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: from: entering hostname (ORIGIN), requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 0 keys avail
debug2: permitted_by_dest_constraints: constraint 1 mgtsrv001.houseofnerds.it (3 keys) > mgtsrv001.houseofnerds.it (3 keys)
debug3: match_key_hop: from: entering hostname mgtsrv001.houseofnerds.it, requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 3 keys avail
debug3: match_key_hop: from: key 0: ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug3: match_key_hop: to: entering hostname mgtsrv001.houseofnerds.it, requested key ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA, 3 keys avail
debug3: match_key_hop: to: key 0: ED25519 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA
debug2: permitted_by_dest_constraints: allowed for hostname mgtsrv001.houseofnerds.it
debug1: process_sign_request2: good signature

SSH Host Key Fingerprints (for host key identification in logs)

My Client Desktop

256 SHA256:Fbrp996qA6h0L47paVoAxfpeqNI1hmcreZA3zHydXe8 root@chris-desktop-manjaro (ECDSA)
256 SHA256:6lkIxi8cWqjxNucAG1EkHcqwn4UY3j6hUKK2Dm3VNN8 root@chris-desktop-manjaro (ED25519)
3072 SHA256:tw2FsUBvTO+6xgc3DKQVOYpbfiopUBsj9NTfsOmLAAI root@chris-desktop-manjaro (RSA)

Remote Server

256 SHA256:z2P2DOhKd1+LuFYPSUVlk8ji/umDRFbUPgIcDcKd/Wg root@mgtsrv001 (ECDSA)
256 SHA256:EqqH3tykK2ZegFS92yu3EYv7NlRag+eetFuzZuvQASA root@mgtsrv001 (ED25519)
2048 SHA256:olf2Zt8c+KroD7OSQ+99qCnyl6HVnnCtoYoPvK2ybRI root@mgtsrv001 (RSA)

SSH Host Public Keys

My Client Desktop

ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJ5wVJn+adRUM4KFEFzR0RGQ4CyGj2BNUSN8u2tzCFWukIQc6H8uAxwGZ6SecENf0SRI0plEQDJxB/UiNnGzsR4= root@chris-desktop-manjaro
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICx7nS7swXTgC4RMDXm2JLEv+9ZUOx7FTZlFhfSSAlwc root@chris-desktop-manjaro
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCuIzKSXMmPosJlkD3dGf9Rj4kM6BBegd1EKdpwVL3i6caxdhw+7oF5eOLP962o6/Y2+KSRxGaCyewXIqFGswyfLipvYfURu1JlsaBy9vd9TesOvF6L4U/UyllqEZ4hzf7CPFtIadk++Xn5sq2bI28g3YE+oe3gTGAmV6UAj8To+x+Mo/vGEK5R0rfM13y0TS7DiJZ057G1AksxlnVvmo4IIsTlckn95ANJXbaM9CuYI7IQURg0ZAooCq3gv0yXAjBUMq6dYwOcmqeeBHgSU3RbGapvs20+X9TAA/naZZTQk9I41UTCARUe8KYvbY+foE1yzbXTi4eAbsXPEPNjbrnupFeRCZYSDggE+xb2KpbDu+pW+OU0FVo5eZgV4y8sFqvWp6XrMs8c9baD+d03871ZOuEgedKj/s3QO6kJx1/exRmAY0cvJhHpZvkGhT6k1xBDlAVzI4JnCHxKr4onJpVkBXf1J3GDuD+VjZnEhcAVtkZV5vRzq5ytUSvM5y93YXk= root@chris-desktop-manjaro

Remote Server

ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE84DLXfZCT7d/d1tC7B0vTmx9mX3+cUBU7W1mypDwWyK6uS/AUFAO3eoEsAZvW+hxXHv44ZPxdA9zceCMboOuk= root@mgtsrv001
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOSvUJ0hr/beC73upL2SrC0so7D+N4OrJWFhsd5MH6z2 root@mgtsrv001
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDT0Wu2DG7LMTZVhKU3++idMvJdaiCUpTOdvEyBTnJDsc7jSwqiSnlcv27w1YAew6dPFvPD1MYlPLz+M/vdpf+ZFpE3BN3u2bsXHKXm8VXrTWM0rEsDMmP7duZQJxpuhAb74p3S5on1hzF6dzAbfEd/VYQ/72vWkHAB91+fP3ckNb5DWGx6d1sAJ5PpAQQeH5DJyjxmfq6F7l3L8JfVZJNwr/8+DZiReaXxueqGKnvg3qhAd16qJdVxQdakaqS15KUGDBZfIq0B3ibu5hAhd7HxL/8fXjSAJy9yFKAV0x3ZfaK3RxDilKt1PUDiaHz6oFRW5l/oMIHJTcCdQ6+2D+2h root@mgtsrv001