Deny all IP SSH

December 26, 2013 2.7k views
Hi,how i can deny all IP to connect at putty except my ip? Thanks
3 Answers
I don't think PuTTY has that capability.
If your droplet has UFW firewall on it you could try
sudo ufw allow from my.home.ip.address
sudo ufw enable
This would allow all traffic from home computer. Did this when building and testing my droplets.

Very specific rule would be
sudo ufw allow from my.home.ip.address to any port 22 proto tcp

Note: If you changed you default ssh port adjust as needed.

You could then expand on it as needed. Opening any required ports to world later. 80, 443 etc

You can't deny all IP SSH connections to your droplet at your workstation at Putty. Basically you will deny all public IP SSH connections at your droplet except your IP address.
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!