SSH login from remote host

Hi everyone,

We have changed the default port of sshd in /etc/ssh/sshd_config and can connect to via this port from the LAN. But we can't connect from the outside (from the Internet). We use pf as firewall. Please help us!

Thanks.
 
First check that sshd is listening to your external interface, if not, verify the "ListenAddress" option in /etc/ssh/sshd_config.

Second, check your /etc/pf.conf. It should have a rule something like this (but it really depends on your setup):

Code:
pass in on $ext_if proto tcp to ($ext_if) port ssh

Third, verify it's not being blocked by any external routers (like your DSL router, etc) and has appropriate forwarding rules for port 22.

Also for a general trouble shooting tip, run the ssh client with the -v option. As in:

[cmd=]ssh -v myhost.com[/cmd]

It will provide more information on where it might be failing. Lastly, if you are still having problems, please provide more information than "Can't connect". This could be anything from a network to a firewall to a authentication to a protocol problem. It's really hard to tell without more details.
 
feralape said:
First check that sshd is listening to your external interface, if not, verify the "ListenAddress" option in /etc/ssh/sshd_config.

Second, check your /etc/pf.conf. It should have a rule something like this (but really depends on your setup):

Code:
pass in on $ext_if proto tcp to ($ext_if) port ssh

Third, verify it's not being block by any external routers (like your DSL router, etc) and has appropriate forwarding rules for port 22.

Also for a general trouble shooting tip, run ssh client with the -v option. As in:

Code:
ssh -v myhost.com

It will provide more information on where it might be failing. Lastly, if you are still having problems, please provide more information than "Can't connect". This could be anything from a network to a firewall to a authentication to a protocol problem. It's really hard to tell without more details.

Thanks bro!
 
Back
Top