Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I changed the ssh port from 22 to 2021 and it worked correctly till 3hours ago,after that when I can't connect to ssh.

ssh: connect to host 130.185.72.125 port 2021: Connection refused

so I checked iptables,I stop it from webmin,and

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT) target prot opt source destination

Chain OUTPUT (policy ACCEPT) target prot opt source destination

where is the problem?

share|improve this question
    
Is the SSH service still listening on that port? –  Shane Madden May 25 '12 at 15:37
add comment

1 Answer

The sshd process may not be running at all.

try checking with:

netstat -tulpn  | grep LISTEN | grep sshd

to see if it's running, and on which port.

share|improve this answer
    
definitely what one would expect if there was nothing listening there... $ ssh -p 12345 localhost ssh: connect to host localhost port 12345: Connection refused –  Tom H May 25 '12 at 15:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.