The delay for ssh login is too long.
$ ssh 192.168.1.7
[email protected]'s password:
(waiting... Too Long... 26 seconds...)
(waiting... Too Long... 26 seconds...)
(waiting... Too Long... 26 seconds...)
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-62-generic x86_64)
...
...
I found a solution that configure the /etc/ssh/ssh_config
as if the following.
GSSAPIAuthentication no # yes -> no
GSSAPIDelegateCredentials yes # no -> yes
UseDNS no # added
But when I try to do ssh login, I got the following error message.
$ ssh 192.168.1.7
/etc/ssh/ssh_config: line 57: Bad configuration option: usedns
/etc/ssh/ssh_config: terminating, 1 bad configuration options
Why? How can I speed up the SSH login?
That is a server option, not a client one. It should be set in the machine you are connecting to (the server) and not on the machine you are connecting from (the client). Also, it needs to be in
/etc/ssh/sshd_config
and not/etc/ssh/ssh_config
. The former is the configuration file used when the machine is acting as a server (receiving connections) and the latter when the machine is a client (connecting to another machine).Mind you, I very much doubt this will make any difference in the connection times you're seeing, but you may as well try it.