Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Heads up I'm a noob with linux and networking.

I set up a ubuntu server and I have a static ip for my network. When I try to connect to the server at home (external), it prompts me to log in. I supply the correct password (or incorrect pw), I get the error Permission denied, please try again.

and after 3 times I get

Permission denied (publickey,gssapi-with-mic,password)

I am however able to connect with SSH from another computer in the same network with ssh < internal ip of server >

I'm connecting with mac os x and my config file is vanilla.

Note: During installation of ubuntu it says I don't have a default route or something while doing auto network configuration, but I ignored it and continued the installation, could this be the problem?

EDIT:

I have tried the below, I have nothing in hosts.allow and also iptables shows the ports that I have allowed, which is 22.

I checked the auth.log, and there is nothing when I connect to it remotely (even when it says permission denied). I have tried connecting to it internally and the correct authentication logs show. Any idea whats wrong?

share|improve this question
    
What is the output of iptables -L -v -n? –  quanta Sep 4 '11 at 5:42
    
I believe I have found the problem. The network admin forwarded the ports to the wrong destination, 192.168.1.253 when the server is at 192.168.1.8. Still kind of weird because it seemed like I was able to connect to the ubuntu server with the correct username at login. Thanks anyway! –  zentenk Sep 4 '11 at 6:11
    
That's why you're supposed to check the fingerprint when it says "The authenticity of host ________ can't be established." - so that you're not just sending your password to a random machine. –  nickgrim Aug 5 '12 at 11:43

1 Answer 1

It sounds like your ssh server is only allow login from specific IP. Check /etc/hosts.allow if you see something like this:

sshd: IP

Also check if you have iptables is running:

iptables -L -v -n

Take a look at /var/log/auth.log, it will tell you more details.

share|improve this answer
    
thanks I'll check it tomorrow, but what do I do if it /etc/hosts.allow shows sshd: IP? –  zentenk Sep 3 '11 at 10:25
    
Remove that line if you want to allow login from any IP. –  quanta Sep 3 '11 at 10:28

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.