0

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?

1
  • Is the SSH service still listening on that port? May 25, 2012 at 15:37

1 Answer 1

4

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.

1
  • 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
    May 25, 2012 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .