Increase connection Timeout connect to server

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

EDIT 2:

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?


Solution 1:

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.