When i use terminal to ssh to machine A: it takes some 10 seconds and then prompts for password

I am using connect to server options to use sftp to connect to machine A and it says : timed-out while logging in.

Does anyone know how to increase the connection timeout while using connect to server option in ubuntu 15.04?

EDIT : This is the GUI I am talking about, the connect to server option can be seen below Browse Network enter image description here

Changing the options in /etc/ssh/ssh_config didn't work


I just upgraded my system to Ubuntu 15.10 and voila, it started working! I don't know how, but I am glad it works now, is there a way I can withdraw the bounty?

  • Could you ever connect via SFTP? – A.B. Oct 25 '15 at 17:25
  • yeah i have tried connecting via sftp using the terminal and that works! It's the gui that's creating problems! – Vikash B Oct 25 '15 at 17:39
  • when you changed the options for timeout in /etc/ssh/sshd_config did you then allso do sudo service ssh restart? I see you said /etc/ssh/config is that really waht you meant? – j0h Oct 26 '15 at 15:22
  • 1
    @VikashB, unfortunately "You may not cancel a bounty once it has been started." see askubuntu.com/help/bounty – user.dz Oct 30 '15 at 13:04
  • 3
    If you solved the issue, add and accept an answer explaining it so people don't come and read your problems... – Alex Nov 1 '15 at 15:56

The optimal place to put this is in your ~/.ssh/config file. Putting these options in /etc/ssh/ssh_config will make the change for all users on the system which is often undesirable. Additionally, these changes will not be portable were you to move your home directory for another server. Within your config file one can make a change as follows:

Host example-server
    HostName server.example.com
    Port 2200
    User example-user
    ConnectionTimeout 20
    GSSAPIAuthentication no
    ForwardAgent yes

Performing the changes in this way also allows you to make additional configuration changes which would not be available in the GUI interface (such as port number, or changing GSS API support).

From there in the "connect to server" interface, simply reference the name "example-server" rather than the fully qualified domain name (FQDN) to use these options.


I am answering my own question as suggested:

This issue has been resolved in both 15.10 and 16.04, so if you guys are up for it, do a dist upgrade.

Your Answer

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

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