Server refused our key

Advertisement

marco1995
Guest

Server refused our key

I am trying to connect to a server with a ppk but it prompts the 'server refused my key' error and require a password. Any idea on the cause as the key works in other PSs. Thanks.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,392
Location:
Prague, Czechia

Re: Server refused our key

Please attach a full session log files both from the PC, where it works, and the PC, where it does not.

To generate the session log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

marco1995
Guest

Log files

Success:
2022-01-11 11:50:12.942 Reading key file "C:\MyDoc\IT_source\_Machine Setup\Files\Prod SSH Key\kpmgItOps-ssh-key-prod.ppk"
! 2022-01-11 11:50:12.958 Using username "kpmgItOps".
. 2022-01-11 11:50:13.068 Detected network event
. 2022-01-11 11:50:13.068 Enumerating network events for socket 1944
. 2022-01-11 11:50:13.068 Enumerated 1 network events making 1 cumulative events for socket 1944
. 2022-01-11 11:50:13.068 Handling network read event on socket 1944 with error 0
. 2022-01-11 11:50:13.068 Waiting for the server to continue with the initialization
. 2022-01-11 11:50:13.068 Looking for incoming data
. 2022-01-11 11:50:13.068 Looking for network events
. 2022-01-11 11:50:13.068 Server offered these authentication methods: publickey,password,keyboard-interactive
. 2022-01-11 11:50:13.068 Offered public key
. 2022-01-11 11:50:13.084 Detected network event
. 2022-01-11 11:50:13.084 Enumerating network events for socket 1944
. 2022-01-11 11:50:13.084 Enumerated 1 network events making 1 cumulative events for socket 1944
. 2022-01-11 11:50:13.084 Handling network read event on socket 1944 with error 0
. 2022-01-11 11:50:13.084 Waiting for the server to continue with the initialization
. 2022-01-11 11:50:13.084 Looking for incoming data
. 2022-01-11 11:50:13.084 Looking for network events
. 2022-01-11 11:50:13.084 Offer of public key accepted
! 2022-01-11 11:50:13.084 Authenticating with public key "imported-openssh-key"
. 2022-01-11 11:50:13.291 Sent public key signature
. 2022-01-11 11:50:13.307 Detected network event
. 2022-01-11 11:50:13.307 Enumerating network events for socket 1944
. 2022-01-11 11:50:13.307 Enumerated 1 network events making 1 cumulative events for socket 1944
. 2022-01-11 11:50:13.307 Handling network read event on socket 1944 with error 0
. 2022-01-11 11:50:13.307 Waiting for the server to continue with the initialization
. 2022-01-11 11:50:13.307 Looking for incoming data
. 2022-01-11 11:50:13.307 Looking for network events
. 2022-01-11 11:50:13.307 Access granted
Failed:
2022-01-11 10:39:39.726 Looking up host "10.0.226.251" for SSH connection
. 2022-01-11 10:39:39.726 Connecting to 10.0.226.251 port 30022
. 2022-01-11 10:39:39.758 We claim version: SSH-2.0-WinSCP_release_5.19.2
. 2022-01-11 10:39:39.808 Remote version: SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
. 2022-01-11 10:39:39.808 Using SSH protocol version 2
. 2022-01-11 10:39:39.808 Have a known host key of type ssh-ed25519
. 2022-01-11 10:39:39.824 Doing ECDH key exchange with curve Curve25519 and hash SHA-256
. 2022-01-11 10:39:39.964 Server also has ssh-rsa host key, but we don't know it
. 2022-01-11 10:39:39.964 Host key fingerprint is:
. 2022-01-11 10:39:39.964 ssh-ed25519 255 bd:4d:dc:e5:d3:89:da:bc:15:69:d9:fe:cd:b5:cf:0d eZE6UM879QvV8+yYGqswx2Azz3V/1EygMFVBl/8yEsA=
. 2022-01-11 10:39:39.996 Host key matches cached key
. 2022-01-11 10:39:39.996 Initialised AES-256 SDCTR (AES-NI accelerated) [aes256-ctr] outbound encryption
. 2022-01-11 10:39:39.996 Initialised HMAC-SHA-256 outbound MAC algorithm
. 2022-01-11 10:39:39.996 Initialised AES-256 SDCTR (AES-NI accelerated) [aes256-ctr] inbound encryption
. 2022-01-11 10:39:39.996 Initialised HMAC-SHA-256 inbound MAC algorithm
. 2022-01-11 10:39:40.012 Reading key file "C:\MyDoc\Marco Local Backup\Marco_local_z\Prod SSH Key\kpmgItOps-ssh-key-prod.ppk"
! 2022-01-11 10:39:40.012 Using username "KpmgItOps".
. 2022-01-11 10:39:40.059 Server offered these authentication methods: publickey,password,keyboard-interactive
. 2022-01-11 10:39:40.059 Offered public key
! 2022-01-11 10:39:40.089 Server refused our key
. 2022-01-11 10:39:40.125 Server refused our key
. 2022-01-11 10:39:40.125 Server offered these authentication methods: publickey,password,keyboard-interactive
. 2022-01-11 10:39:40.125 Attempting keyboard-interactive authentication
. 2022-01-11 10:39:40.141 Server refused keyboard-interactive authentication
. 2022-01-11 10:39:40.141 Server offered these authentication methods: publickey,password,keyboard-interactive
. 2022-01-11 10:39:40.141 Prompt (password, "SSH password", <no instructions>, "&Password: ")
. 2022-01-11 10:39:41.639 Attempt to close connection due to fatal exception:
. 2022-01-11 10:39:41.639 Closing connection.
* 2022-01-11 10:39:41.655 (ESshFatal)

Reply with quote

martin
Site Admin
martin avatar

Re: Log files

You are using KpmgItOps username in failing session, while kpmgItOps in the working session. Usernames are typically case sensitive in *nix systems.

Reply with quote

Advertisement

You can post new topics in this forum