Open jagiella opened 3 years ago
I am trying to connect to a remote server via a keyfile with password. The connection failes with the following log output:
Jan 15 17:19:08 LOCAL_HOST NetworkManager[962]: <info> [1610727548.6701] audit: op="connection-activate" uuid="e23451e6-0932-4e9f-a277-f255076d292a" name="VPN 1" pid=66592 uid=1000 result="success" Jan 15 17:19:08 LOCAL_HOST NetworkManager[962]: <info> [1610727548.6746] vpn-connection[0x556a60f5c110,e23451e6-0932-4e9f-a277-f255076d292a,"VPN 1",0]: Started the VPN service, PID 88366 Jan 15 17:19:08 LOCAL_HOST NetworkManager[962]: <info> [1610727548.6826] vpn-connection[0x556a60f5c110,e23451e6-0932-4e9f-a277-f255076d292a,"VPN 1",0]: Saw the service appear; activating connection Jan 15 17:19:08 LOCAL_HOST NetworkManager[962]: <info> [1610727548.6911] vpn-connection[0x556a60f5c110,e23451e6-0932-4e9f-a277-f255076d292a,"VPN 1",0]: VPN connection: (ConnectInteractive) reply received Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: Error getting ssh-agent socket ownership: 14 Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: Using root's .ssh/known_hosts Jan 15 17:19:08 LOCAL_HOST NetworkManager[88371]: sh: 1: Syntax error: Bad fd number Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: ssh started with pid 88372 Jan 15 17:19:08 LOCAL_HOST NetworkManager[962]: <info> [1610727548.6928] vpn-connection[0x556a60f5c110,e23451e6-0932-4e9f-a277-f255076d292a,"VPN 1",0]: VPN plugin: state changed: starting (3) Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020 Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Reading configuration data /etc/ssh/ssh_config Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: /etc/ssh/ssh_config line 21: Applying options for * Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Connecting to REMOTE_HOST [REMOTE_IP] port PORT. Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Connection established. Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: identity file /home/USERNAME/.ssh/id_rsa type 0 Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: identity file /home/USERNAME/.ssh/id_rsa-cert type -1 Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.1 Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.1 Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.1 pat OpenSSH* compat 0x04000000 Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Authenticating to REMOTE_HOST:PORT as 'USERNAME' Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: SSH2_MSG_KEXINIT sent Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: SSH2_MSG_KEXINIT received Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: kex: algorithm: curve25519-sha256 Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: kex: host key algorithm: ecdsa-sha2-nistp256 Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: expecting SSH2_MSG_KEX_ECDH_REPLY Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Server host key: ecdsa-sha2-nistp256 SHA256:YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Host '[REMOTE_HOST]:PORT' is known and matches the ECDSA host key. Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Found key in /root/.ssh/known_hosts:1 Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: Failed to add the ECDSA host key for IP address '[REMOTE_IP]:PORT' to the list of known hosts (/root/.ssh/known_hosts). Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: rekey out after 134217728 blocks Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: SSH2_MSG_NEWKEYS sent Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: expecting SSH2_MSG_NEWKEYS Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: SSH2_MSG_NEWKEYS received Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: rekey in after 134217728 blocks Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Will attempt key: /home/USERNAME/.ssh/id_rsa RSA SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX explicit Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: SSH2_MSG_EXT_INFO received Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com> Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: SSH2_MSG_SERVICE_ACCEPT received Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Authentications that can continue: publickey Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Next authentication method: publickey Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Offering public key: /home/USERNAME/.ssh/id_rsa RSA SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX explicit Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: Server accepts key: /home/USERNAME/.ssh/id_rsa RSA SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX explicit Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: debug1: No more authentication methods to try. Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: USERNAME@REMOTE_HOST: Permission denied (publickey). Jan 15 17:19:08 LOCAL_HOST nm-ssh-service[88366]: ssh exited with error code 255 Jan 15 17:19:08 LOCAL_HOST NetworkManager[962]: <warn> [1610727548.9993] vpn-connection[0x556a60f5c110,e23451e6-0932-4e9f-a277-f255076d292a,"VPN 1",0]: VPN plugin: failed: connect-failed (1) Jan 15 17:19:08 LOCAL_HOST NetworkManager[962]: <warn> [1610727548.9993] vpn-connection[0x556a60f5c110,e23451e6-0932-4e9f-a277-f255076d292a,"VPN 1",0]: VPN plugin: failed: connect-failed (1) Jan 15 17:19:08 LOCAL_HOST NetworkManager[962]: <info> [1610727548.9993] vpn-connection[0x556a60f5c110,e23451e6-0932-4e9f-a277-f255076d292a,"VPN 1",0]: VPN plugin: state changed: stopping (5) Jan 15 17:19:08 LOCAL_HOST NetworkManager[962]: <info> [1610727548.9994] vpn-connection[0x556a60f5c110,e23451e6-0932-4e9f-a277-f255076d292a,"VPN 1",0]: VPN plugin: state changed: stopped (6)
LOCAL_HOST, REMOTE_HOST, REMOTE_IP, PORT, USERNAME, XXXXXXX and YYYYYYY are placeholders for privacy reasons ;)
LOCAL_HOST
REMOTE_HOST
REMOTE_IP
PORT
USERNAME
XXXXXXX
YYYYYYY
I also tried ssh-agent, but with similar results.
I am trying to connect to a remote server via a keyfile with password. The connection failes with the following log output:
LOCAL_HOST
,REMOTE_HOST
,REMOTE_IP
,PORT
,USERNAME
,XXXXXXX
andYYYYYYY
are placeholders for privacy reasons ;)I also tried ssh-agent, but with similar results.