Question
Can't login to droplet after iptables command
After seeing multiple fail attempts to login using SSH from intruder I found this solution on http://unix.stackexchange.com. After second command console tab freezed and connection to droplet was droped.
iptables -A INPUT -p tcp –dport 22 -m recent –update –seconds 60 –hitcount 4 –name SSH –rsource -j DROP
iptables -A INPUT -p tcp –dport 22 -m recent –set –name SSH –rsource -j ACCEPT
Now I have the problem to login to my droplet via SSH and I’m getting these messages.
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Reading configuration data /c/Users/Milan/.ssh/config
debug1: Connecting to <droplet-ip> [<droplet-ip>] port 22.
debug1: connect to address <droplet-ip> port 22: Attempt to connect timed out without establishing a connection
ssh: connect to host <droplet-ip> port 22: Bad file number
Does someone knows how to fix that?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×