This question already has an answer here:

I am trying to login into one(X) server using putty (port 22), it is showing Fatal Error. In Pop-up (Network error: Connection timed out).

But when I am in different server(Y) on command prompt using

ssh (X)hostname

it is working, only issue with the putty.

At the same time, I am able to logged into some different servers(Y,Z) through putty.

marked as duplicate by pa4080, Eric Carvalho, mniess, Zanna, David Foerster Oct 20 '17 at 13:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Go /etc/ssh/sshd_config and find the line # Authentication: LoginGraceTime 120. Now change 120 to 300 and save it. I think it will give you 5 minutes more than 2 minutes for logIN.

  • 1
    Finally we found the problem it is firewall issue. Now we fixed it.Thanks for your response guys. – Praveen Korrapati Sep 9 '15 at 12:31

I started getting time-outs for SSH connection after I installed firewalld package on Ubuntu 15.04. It must be something in the firewall settings that instructs the SSH server to refuse connection to specific clients (evidently, Putty is among such clients).

Removing firewalld resolved the problem for me.

apt-get autoremove firewalld

If you still need a firewall, you will need to find out which one you're using and adjust the settings accordingly.

  • No need to remove Firewall! Firewall is very important. Instead use the following command: sudo ufw allow 22 – Oliver Kucharzewski Nov 18 '17 at 1:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.