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?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!