Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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 ??

share|improve this question
add comment

2 Answers 2

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"

share|improve this answer
add comment

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 netstat -nr. Here is what I get:

netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0

Find the gateway, for me it is 192.168.1.1. Next, try connecting to it through ssh:

ssh 192.168.1.1

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).

share|improve this answer
    
no there is no SSH server on the router I know that and I have checked it now again. I feel like the SSH server on ubuntu is like configured to accept connections only from the local network. I don't know how is this ... but this is what I feel. Is there anyway I can like show the configuration ? or any other ideas u got that might help me ?? –  I.el-sayed Nov 19 '12 at 2:48
    
Guys please any help with this problem ?? –  I.el-sayed Nov 19 '12 at 22:03
    
Do check your /etc/ssh/sshd_config –  Terry Wang Nov 20 '12 at 8:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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