D
D
DennyD3142017-11-01 13:20:53
SSH
DennyD314, 2017-11-01 13:20:53

Why can't I access the server via SSH?

Hello!
There are 2 virtual servers with Ubuntu OS. Each of them was configured with shh access via root without a password.
Everything worked well, but authorization without a password by key suddenly stopped working. When I try to authorize, I see the message "Server refused public-key signature despite accepting key!" . And so on both servers.
I set shh logging DEBUG in the config and in auth.log I see:
Nov 1 06:05:10 sshd[10270]: debug1: userauth-request for user root service ssh-connection method none [preauth]
Nov 1 06:05:10 sshd [10270]: debug1: attempt 0 failures 0 [preauth]
Nov 1 06:05:10 sshd[10270]: debug1: PAM: initializing for "root"
Nov 1 06:05:10 sshd[10270]: debug1: PAM: setting PAM_RHOST to
Nov 1 06:05:10 sshd[10270]: debug1: PAM: setting PAM_TTY to "ssh"
Nov 1 06:05:10 sshd[10270]: debug1: userauth-request for user root service ssh-connection method publickey [preauth ]
Nov 1 06:05:10 sshd[10270]: debug1: attempt 1 failures 0 [preauth]
Nov 1 06:05:10 sshd[10270]: debug1: test whether pkalg/pkblob are acceptable [preauth]
Nov 1 06: 05:10 sshd[10270]: debug1: temporarily_use_uid: 0/0 (e=0/0)
Nov 1 06:05:10 sshd[10270]: debug1: trying public key file /root/.ssh/authorized_keys
Nov 1 06 :05:10 sshd[10270]: debug1: fd 4 clearing O_NONBLOCK
Nov 1 06:05:10 sshd[10270]: debug1: matching key found: file /root/.ssh/authorized_keys, line 5 RSA
Nov 1 06:05 :10 sshd[10270]: debug1: restore_uid: 0/0
Nov 1 06:05:10 sshd[10270]: Postponed publickey for root from 000.000.000.251 port 17033 ssh2 [preauth]
Nov 1 06:05:10 sshd[10270]: debug1: userauth-request for user root service ssh-connection method publickey [preauth]
Nov 1 06:05:10 sshd[10270]: debug1: attempt 2 failures 0 [preauth]
Nov 1 06:05:10 sshd[10270]: debug1: temporarily_use_uid: 0/0 (e=0/ 0)
Nov 1 06:05:10 sshd[10270]: debug1: trying public key file /root/.ssh/authorized_keys
Nov 1 06:05:10 sshd[10270]: debug1: fd 4 clearing O_NONBLOCK
Nov 1 06:05 :10 sshd[10270]: debug1: matching key found: file /root/.ssh/authorized_keys, line 5 RSA
Nov 1 06:05:10 sshd[10270]: debug1: restore_uid: 0/0
Nov 1 06:05: 10 sshd[10270]: error: hash mismatch
Nov 1 06:05:10 sshd[10270]: debug1: ssh_rsa_verify: signature incorrect
Nov 1 06:05:10 sshd[10270]: Failed publickey for root from 000.000.000.000 port 17033
Tried to generate new keys and add to auth_keys, change rights to .shh and auth_keys.
The error remains the same.
I'm connecting to a Windows PC using putty.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sly_tom_cat ., 2017-11-01
@Sly_tom_cat

I think you need to dig signatures:

Nov 1 06:05:10 sshd[10270]: error: hash mismatch
Nov 1 06:05:10 sshd[10270]: debug1: ssh_rsa_verify: signature incorrect

D
Dmitry, 2017-11-01
@totalcount

Cleaned on YOUR computer ~/.ssh/known_hostand ~/.ssh/authorized_keys? Or, if there is Windows, then I will not say where they are stored, but the general meaning is the same. If this is done, but does not help, then you need to run it sshd -vand take a closer look at what is happening there. If -vit is not enough, then try -v -vor even -v -v -v.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question