Results 1 to 3 of 3
Hello, I keep getting a connection refused error whenever I try to connect to a remote ssh server. I tried the web-based test at ssh.icannotconnect.com and it says ssh outbound ...
- 03-04-2011 #1Just Joined!
- Join Date
- Mar 2011
- Posts
- 1
SSH connection refused port 22
Hello, I keep getting a connection refused error whenever I try to connect to a remote ssh server. I tried the web-based test at ssh.icannotconnect.com and it says ssh outbound port 22 is not being blocked. I'm wondering what else could be the problem here.
- 03-06-2011 #2Just Joined!
- Join Date
- Feb 2011
- Location
- Zagreb
- Posts
- 10
Hello,
There are few things, U have to check..
1. - to be sure, can U check on server: shell# telnet localhost 22
2. - if 1. works, check for firewall (iptables) - turn off temporary
2.1. check /etc/hosts.deny file (try find your IP)
2.2. If U have selinux service enabled, try disabling it (or add rules there) - for this one, check this file(On centOS) - /etc/sysconfig/selinux - change line:
SELINUX=enforcing into SELINUX=disabled
3. check /etc/init.d/sshd_config, to which ip address is sshd binded?
PS. after(if) u change anything about selinux, U have to reboot server
BTW, what disto U have?
BR
Vizinger Dino
- 03-11-2011 #3
I don't know much about this site other then I tried it and it stated that I have SSH was ALLOWED when in fact it is closed on my network from the internet. So I think it is safe to say you cannot trust what they are telling you.
As the other poster stated you need to check a few things:
1. the port that SSH is listening on. Also if the firewall is setup at the hosting company to use another port on the internet side that is then NAT'ed to what ever port ssh is listening to on the inside.
2. The firewall at both ends to ensure that your traffic is allowed to pass.
3. The host system doesn't have anything configured that would deny your connection.
You should never have to do this. Checking the rules should be enough.
You don't need to disable SELinux for SSH and you sure don't have to edit any files or reboot to disable it temporarily.2.1. check /etc/hosts.deny file (try find your IP)
2.2. If U have selinux service enabled, try disabling it (or add rules there) - for this one, check this file(On centOS) - /etc/sysconfig/selinux - change line:
SELINUX=enforcing into SELINUX=disabled
3. check /etc/init.d/sshd_config, to which ip address is sshd binded?
PS. after(if) u change anything about selinux, U have to reboot server
BTW, what disto U have?
BR
Vizinger Dino


Reply With Quote

