So, a few weeks ago my remote SSH to a server stopped working. First of all my setup - I have my server running ESXI, 2 VMs, one as firewall and one where my server resides.

I have a NAT rule set up, which works (my port -> firewall -> 22 -> Server)

Now, when I try to ssh to this server (keep in mind, this used to work) using ssh -p port user@ip I get to the password prompt no problem, but no matter what I try, I can't get authenticated. I made SURE that I have the right password (even setting the password to "test" using passwd through the ESXI management console) - still no luck.

My auth.log tells me that "Failed password for (user) from (my local IP) port (some number that isn't 22, something like 27203 last time)"

Can anyone point me in the right direction on how to fix this?

I made sure the config allows password authentification and root log in (neither root nor my user work) I made sure my port forward works (I definitely get through to the server) I made sure my firewall doesn't discard my ssh traffic (see above) I absolutely made sure I have the right password

Any help would be appreciated.

  • Do i understand this correctly, are you running an SSH server with root login enabled and a port forwarding rule? This is really not recommended at all, it's highly insecure! Never open up a root ssh to the internet unless you are honey-potting any possible intruders. – x13 Feb 10 '16 at 12:51
  • @ThisNameBetterBeAvailable I know it's really insecure, I'm just testing a few things out on gitlab so it doesn't matter. If anyone goes ahead and places anything on my machine, all it takes is a quick click to make a new VM. This is not a production setup, thanks for your concern though. – Nico Weiss Feb 10 '16 at 12:58
  • I had my raspberry pi like this for a while, i eventually shut the port forwarding down for every port except 1723 (PPTP VPN server). Whenever i need to ssh, i'll connect to the VPN first. – x13 Feb 10 '16 at 13:07

The problem may be with permissions for your ssh configuration files and directories, check here.

Also try sshd in debug mode:

/usr/sbin/sshd -d
  • 1
    I am just stupid. I was looking into password auth only, but I realized I forgot to enable root log in (my other user, I just typod so hard it's not even funny) - I had done this previously, but since then the server got a fresh install so I forgot. – Nico Weiss Feb 10 '16 at 11:59
  • @NicoWeiss no problem. You got your ssh finally working and I got my first 15 reputation score, so I can finally add links to my answers here etc.) – Yaroslav Nikitenko Feb 10 '16 at 15:45
  • @NicoWeiss I think that ssh verbosity in such error situations might be much better. – Yaroslav Nikitenko Feb 10 '16 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.