SSH connection problem - allowed from LAN but not WAN
Posted
by
Kerem Ulutas
on Server Fault
See other posts from Server Fault
or by Kerem Ulutas
Published on 2011-05-31T15:52:24Z
Indexed on
2012/09/11
15:40 UTC
Read the original article
Hit count: 295
ssh
|arch-linux
I tried to setup my Arch Linux installation to be an SSH host, but here is the thing:
I can ssh localhost
, it fails to login via public key and asks for username and password, but still able to login.
When I try ssh my_wan_ip
it gives ssh_exchange_identification: Connection closed by remote host
error. I've read all topics about this error and none helped me. By the way, just confirmed, it gives ssh: connect to host my_dyndns_hostname port 22: Connection refused
from another machine (outside of my network, it has different wan ip).
I have sshd: ALL
in "hosts.allow", ALL:ALL
in "hosts.deny".
I am able to connect to my own pc via ssh, ping my own pc, but my ssh setup seems to be the problem, it gives that annoying error when I try to ssh from wan.
/etc/ssh/ssh_config
/etc/ssh/sshd_config
And finally, here is the debug output for both sshd and ssh: (i ran ssh command and i took output to sshd debug after that):
I can edit my question according to your needs. Just ask for any more information needed. BTW I have no iptables running. I have one cable dsl modem connected to a asus wl-330gE wireless access point, they both have their firewall disabled. I configured NAT so port 22 is directed to the pc I'm having this trouble.
Any help appreciated, thanks..
© Server Fault or respective owner