When I freshly installed UBUNTU , and tried to login to Ubuntu via ssh , it takes up-to 10-20 seconds for password prompt.
The quick fix was . . .
Solution # 1
The quick fix was to inform ssh to stop using DNS during the connection.
Issue the following command in terminal and restart SSH.
sudo echo "UseDNS no" >> /etc/ssh/sshd_config
Restart SSH Service
service ssh restart
Now login to server via ssh an this time it will work instantly
Regar’d
Syed Jahanzaib
OR the MANUAL way to add UseDNS in sshd_config file
You can do it manually on the config file.
Add the following to your sshd_config file and restart SSH.
Edit the /etc/ssh/sshd_config file using the following command
nano /etc/ssh/sshd_config
& Add the following line at top.
UseDNS no
Save the File and Exit , restart ssh service and Re-Try Login. It ill work fast now without delays.
Solution # 2
Edit the /etc/ssh/ssh_config file using the following command
nano /etc/ssh/ssh_config
Commen the following lines by adddin # at start of the line
GSSAPIAuthentication yes GSSAPIDelegateCredentials no
TO
# GSSAPIAuthentication yes # GSSAPIDelegateCredentials no
save the file and exit and restart SSH service by
service ssh restart
***************************************************************
Howto install SSH Server in Ubuntu
if you have forgot to install SSH server during Ubuntu server installation, then you can install it , just make sure you have internet access on the box.
With Root access use following
sudo apt-get install openssh-server
Thanks! solved my prob
LikeLike
Comment by koekoek — May 18, 2012 @ 8:17 PM
Thanks !! It saves me 5s * thousands of time
LikeLike
Comment by Mike — October 11, 2012 @ 10:23 PM