I have ubuntu 12.04 and I am trying to connect to my SSH server remotely, I get authentication denied because the password is incorrect. However, when I connect to my machine from my local network i.e., 192.168.1.101 and I use the same exact password I used when logging remotely, I connect to my ssh machine correctly .. .any help with that ??
I don't think this is the best way, but it works
inside change port to 39 (any, not 22):
save and restart ssh:
when connect use -p 39:
You can try running the client and server with more verbosity See this answer: Can't Login to my Server via SSH, and the password is correct
Also check if there is a line like "AllowUsers username@ip"
Make sure that your router doesn't have an SSH server running and forward the port 22 to your SSH server.
To make sure that your router isn't running SSH, get the local IP of your router using
Find the gateway, for me it is 192.168.1.1. Next, try connecting to it through ssh:
If it asks for username&password, then it has an SSH server. You should be able to disable it from the router's web panel (accessible with the IP we have aquired).
Then, you'll need to forward the port 22 to your SSH server with your router's web panel (accessible with the IP we have aquired).