Hi,
I am having random ssh issues. Sometimes when I try to login it gives me following
user@HOSTNAME:~$ ssh root@SERVER
root@SERVER's password: <-- Waits here for about a minute or so
Write failed: Broken pipe
And sometimes it takes a lot of time for login prompt to come up and once password is entered it takes lot of time to login. I Googled and found that slow login prompt could be because of DNS and I changed the DNS and login prompts are almost instantaneous. However it still takes time after entering the password.
I also did ssh -vvv root@SERVER and still is very slow
root@SERVER's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session. <-- very slow from this point onwards and takes about 30-45secs to complete the login
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
Last login: Mon Mar 26 13:24:58 2012 from X.X.X.X
[root@SERVER ~]#
The ssh server is CentOS 5.8 and client is Ubuntu 10.04.
Thanks in advance!
Mayank
[SOLVED] SSH - Slow Login
-
- Posts: 44
- Joined: 2011/10/14 19:00:52
- Location: New York
- Contact:
Re: SSH - Slow Login
I doubt if it's necessary but did you restart the ssh daemon? Looking at `man resolv.conf` it says
[quote]
The resolver configuration file contains information that is read by the resolver routines the first time they are invoked by a process.
[/quote]
[quote]
The resolver configuration file contains information that is read by the resolver routines the first time they are invoked by a process.
[/quote]
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
[SOLVED] SSH - Slow Login
Did you fix the DNS for both server and client? Can each resolve the other's hostname?
-
- Posts: 44
- Joined: 2011/10/14 19:00:52
- Location: New York
- Contact:
Re: SSH - Slow Login
Gents,
Thanks for the responses! SSH seems to be working fine. There was a PTR error as well which I saw and fixed it by deleting the PTR record. There was another host with same DNS entry as mine. I had few OpenOffice and Java update on the server and just for sanity I restarted my server.
@Phil - I only did fixed the DNS on the ssh server.
@TrevorH - I didn't had to restart the ssh daemon. The server restart took care of it.
--Mayank
Thanks for the responses! SSH seems to be working fine. There was a PTR error as well which I saw and fixed it by deleting the PTR record. There was another host with same DNS entry as mine. I had few OpenOffice and Java update on the server and just for sanity I restarted my server.
@Phil - I only did fixed the DNS on the ssh server.
@TrevorH - I didn't had to restart the ssh daemon. The server restart took care of it.
--Mayank
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: [SOLVED] SSH - Slow Login
You are welcome. Thanks for reporting back. Marking this thread [SOLVED] for posterity.