Celeb Glow
general | March 23, 2026

SSH using putty : Network error connection timeout

i am using Ubuntu server 20.04 lts i have configured static IP and can ping google.com and i can also ping server from another computer vice-versa. my ssh status is active and port 22 is listening but when i try to connect through putty using SSH putty pops error of Network error connection timeout

1 Answer

ssh service for Ubuntu is sshd, you can check if it's actually running by typing sudo systemctl status sshd, if sshd it's up then try modifying your firewall rules, as long as I remember Ubuntu comes with ufw by default so I will make some assumptions here:

let's say sshd isn't installed, then sudo apt-get install sshd.

Try this for testing firewall:iptables -A INPUT -p tcp --dport 22 -j ACCEPT Now try to ssh into your server, if it works then remove the iptables entry.

Personally I prefer firewalld because that's the firewall I use daily if you want to use it install it with sudo apt-get remove ufw && sudo apt-get install firewalld

After installing firewalld assuming your nic (ethernet interface) is eth0 move it to public, considering that this is a server and security matters:sudo firewall-cmd --permanent --zone=public --add-interface=eth0

Not recommended add ssh service for this interface: sudo firewall-cmd --permanent --zone=public --add-service=ssh (if you do this you will receive a lot of traffic coming from people trying to enter your server)

Now let's say you have an static ip if you use an static ip on your personal computer then you can add that ip to a whitelist, there are many ways to do this but I will tell you my favorite
sudo firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p tcp --dport 22 --src MY-STATIC-IP -j ACCEPT If you have any problem let me know and I hope this help you!!!

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy