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?
It sounds like your ssh server is only allow login from specific IP. Check
/etc/hosts.allow
if you see something like this:Also check if you have
iptables
is running:Take a look at
/var/log/auth.log
, it will tell you more details.