[SOLVED] Slow SSH Login --> CentOS 5.0 --> VMware Server --> Plesk Control Panel 8.4.0
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Rep:
Slow SSH Login --> CentOS 5.0 --> VMware Server --> Plesk Control Panel 8.4.0
Hi there,
For a while now I have been hosting web sites out of my home and had very few (minor) problems. I would consider my newest problem to be minor as well but I don't think it is because I have to access my machine a lot.
THE PROBLEM I am having is when I log in with Putty my server authentication takes longer than usual. Any other server that I access the authentication process only takes a second or two, its almost instant.
Recently I purchased the DLINK DIR-655 Xtreme Gigabit Router to replace an older DLINK router. Now I run a CentOS 5.0 host system with VMware Server 1.0.6 and the VM is also CentOS 5.0. I am not sure where to start looking ....... is there anyway to test SSH?
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Original Poster
Rep:
Ok, so I have reverse DNS provided by my ISP for my static IP's, is there anything I need to do for my own box or is it something that can't be done by the end user?
If you are on your LAN connecting to your box via private LAN address, then your LAN DNS server must provide an appropriate PTR for the LAN (eg. private address space). You can't ask public DNS servers to return anything in private IP space. So, your ISP is not involved here. Your ISPs server won't be useful here.
You can disable StrictHostKeyChecking, but this probably isn't the best choice.
But I think what happens here is if you do have some name servers setup the box will query them for the rdns. Quickly get the doesnt exist record. Then move on. Giving you the usual quick login time that you expect.
When my local caching name server for my lan is down i get the slow ssh logins. Its looking for a rnds record and waits till it times out then carry's on. When its up it works fine even though we know it can possibly be giving a correct answer for a 192.168 address.
make sure you have some valid name servers in /etc/resolve.conf and that you can dig yahoo.com from the box and resolve the name. then you should be fine.
Im a nice guy so i went and tested this real quick by unplugging my router/caching dns server from the lan
When i did. I had the slow ssh login. When I got in I tried a dig and timed how long it took.
15seconds. That seems about right. If you counted how long it took for your ssh login to go through it would be about 15seconds.
# time dig ptr 192.168.0.101
; <<>> DiG 9.4.2 <<>> ptr 192.168.0.101
;; global options: printcmd
;; connection timed out; no servers could be reached
real 0m15.020s
user 0m0.000s
sys 0m0.004s
#
Here is that same command run again after plugging the router back in.
I didnt get any answer back but it did go through very fast.
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Original Poster
Rep:
Thanks to everyone who replied to this thread! I think I was able to take a way a lot of info.
In the end I edited my /etc/ssh/sshd_config file and did the following:
BEFORE:
Quote:
#UseDNS yes
AFTER:
Quote:
UseDNS no
After un-commenting and specifying SSH to NOT use DNS my log in time seems normal to me. I am not sure why this didn't happen before though, my server has always been behind the same router and pretty much the same settings other than the STATIC IP changing. Anyway now I am back to my supper fast log in!
I for a change, have found issue sligthly elswhere... Not on the server I am trying to access but Linux box I am using everyday.
I have found that delay was caused by GSSAPI authentication method on SSH local client. To resolve the issue I have edited /etc/ssh/ssh_config and updated line -> GSSAPIAuthentication no
This mod solved the speed issue for me as I use only ssh key exchange or manually typed passwords.
I for a change, have found issue sligthly elswhere... Not on the server I am trying to access but Linux box I am using everyday.
I have found that delay was caused by GSSAPI authentication method on SSH local client. To resolve the issue I have edited /etc/ssh/ssh_config and updated line -> GSSAPIAuthentication no
This mod solved the speed issue for me as I use only ssh key exchange or manually typed passwords.
Modify below 2 parameters in /etc/ssh/sshd_config and restart sshd service.
GSSAPIAuthentication no
UseDNS no
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.