Change default ssh port on Fedora EC2
I have changed my /etc/ssh/sshd_config adding multiple ports for it to
listen:
$ grep Port /etc/ssh/sshd_config
Port 22
Port 80
Port 443
However, after a service sshd restart (which shown no errors) I still
cannot connect into any of the non standard ports, neither the server
seems to be listening:
$ netstat -an |grep LISTEN| grep -e "22\|80\|443"
tcp 0 0 0.0.0.0:22 0.0.0.0:*
LISTEN
tcp 0 0 :::22 :::*
LISTEN
No firewall rules to bother either:
$ iptables -L -n -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source
destination
46012 61M ACCEPT all -- * * 0.0.0.0/0
0.0.0.0/0 state RELATED,ESTABLISHED
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
9 338 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
187 11232 ACCEPT tcp -- * * 0.0.0.0/0
0.0.0.0/0 state NEW tcp dpt:22
79 4171 REJECT all -- * * 0.0.0.0/0
0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source
destination
0 0 REJECT all -- * * 0.0.0.0/0
0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT 25028 packets, 2107K bytes)
pkts bytes target prot opt in out source
destination
And just to be sure I even made a few tests after a service iptables stop,
to no effect.
Found some people here with similar issues, but not quite the problem:
Basic SSH port change not working on EC2 instance
My SO:
$ uname -a
Linux ip-xxx 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013
x86_64 x86_64 x86_64 GNU/Linux
Any idea?
No comments:
Post a Comment