I cannot seem to SSH into my server on another Port. I have an identical setup on another server, but I am baffled now if my issue is with IPTables or something else. Does anyone see what I am doing wrong?
I am trying to connect via $ ssh [email protected] -p 555
but I keep getting connection refused.
Here are my IP Table Inputs
Attempt 1
This is what I've added (Saved with the iptables-persistent
package)
$ sudo iptables -A INPUT -p tcp -m state --state NEW --dport 555 -j ACCEPT
Attempt 2
And I've tried this, and it seems to list in netstat | grep 555
better than the above
$ sudo iptables -A INPUT -p tcp --dport 555 -j ACCEPT
The IPtables List
Then I list it out and it appears to be in there
$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:555
Here is my SSHD config
$ head /etc/ssh/sshd_config
# What ports, IPs and protocols we listen for
Port 22
Port 555
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0 <--- This has never been an issue for me
Restart SSH
Then I run
$ sudo /etc/init.d/ssh restart
TCP 0 0 0.0.0.:555 0.0.0.0:*
andIPv4 102514 0t0 TCP *:555 (LISTEN)