Cannot log into SSH servers

I’m having trouble logging into any of the servers I have set up through SSH, it seems like it simply won’t accept the passwords. These machines used to connect just fine and now for some reason won’t anymore.

Things I’ve already tried and ruled out:

  1. The password is definitely correct, I use the same one to log in on the actual machine and it works fine.
  2. The SSH key matches on host and client
  3. The port number is correct
  4. I’m using ecdsa, so not one of the ones that has been sort of phased out
  5. Updating and rebooting both machines doesn’t seem to fix it
  6. The firewall settings on the Lubuntu server aren’t causing it, the IP/port are allowed
  7. Restarting ssh(d) on either machine doesn’t fix it

Any ideas as to what might be going on?

You might add -v to the ssh command to see a detailed debug log.

In your list you write in 1 the password is correct. Are you sure that PasswordAuthentication is enabled on the servers?

1 Like

I’ve checked verbose logging and unfortunately it doesn’t provide any more useful information, I appreciate the reminder about PasswordAuthentication! It is on and doesn’t seem to be making any difference sadly.

It might be worth mentioning too that this has actually happened to me before and I don’t remember what I ended up doing, I think one day it just inexplicably started working again.

please post ssh -vvv <host> the debug log will tell you what is failing

Another try could be starting ssdh on the target server in debug mode:

first stop the service
systemctl stop sshd

and then
sudo /usr/bin/sshd -Dd

this does not detach the server and outputs a debuglog.

This is the reason I’ve been confused, I’m quite certain that the password is correct.

Is there a way for you to login to the machine? That way you could verify if the passphrase is correct or not.

Yes, I can log into the machines not through SSH. To add to the weirdness, if I run

ssh-keygen -y -f /path

it seems to also think that my password is consistently wrong. I’ve tried just about every permutation of every password I’ve ever used and I’m convinced that I have it correct on one of the first tries but for some reason it isn’t accepting it.

Are you talking about the your key passphrase or the user password on the server?

So here is the reason why ssh does not work, now it seems that the passphrase on the key is different then you think, could be accidental whitespace or who knows. I’d say create and use new key and use password manager to store the password safe.

My personal notes on ssh that may help:

Thanks for all your help! That’s kind of the conclusion I came to as well is there must be some misspelling that I used to produce consistently and then for some reason corrected. Le sigh. Gonna have to go through all the servers and try to replace it lol.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.