ssh - connection refused

frmas frmas at
Sat Jan 17 20:18:41 UTC 2009

Smoot Carl-Mitchell a écrit :
>> Hmmm, from your post and the tests I did, the problem could be somewhere
>> else, so. I have a local lan, and running from my laptop (homelaptop)
>> the following command :
>> ssh -X homeserver -p 5317
>> it works fine, but the auth log file on the "server", shows a connection
>> from computer homelaptop with ip So I wonder whether or
>> not the ssh connection is thru the local network only or thru the
>> internet first, then thru my local network.
>> Then, the pb could come from my router, and its configuration. Francois
> Your tests indicate the ssh configuration on the server is fine.  It
> sounds like you are blocking a connection from the Internet on your
> firewall.  I suspect the firewall is setup to return an ICMP Connection
> refused packet when a connection request is received on port 5317.

I have added an entry as "virtual server", in my router settings.
This is what I added :
Enable (x)
Name : ssh
IP Address : (the IP of my homeserver on the local lan)
Protocol : TCP
Private port : 22
Public port : 5317
Inbound filter : allow all
Schedule : Always.

But could the problem come from the settings I added to the
/etc/ssh/sshd_config file with :
# What ports, IPs and protocols we listen for - Default is 22
Port 5317

Should I change it to 22 in my sshd_config file, as I "translate" the
public port 5317 to a private port 22 on my router settings?


More information about the ubuntu-users mailing list