LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-14-2003, 01:24 AM   #1
Grim Reaper
Member
 
Registered: Apr 2002
Distribution: Gentoo 2006.0 AMD64
Posts: 399

Rep: Reputation: 30
Slow SSH...


When ever i try to SSH into my netserver it seems to be extremely slow in logging in...I'll type in the IP address, then it'll take about 4 seconds to show the 'login as: ' screen, then once ive typed in the username and hit enter it takes 10 seconds to show the 'fallenb@192.168.0.1's password: '

When i enter the password and hit enter it goes instantly and any commands i enter from then on goes instantly...but while just connecting to the machine and entering the username is heaps slow...any idea's?

BTW, the machine is Debian...
 
Old 02-14-2003, 04:38 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592
Did you already have a look at http://www.linuxquestions.org/questi...threadid=15657 and
http://www.linuxquestions.org/questi...threadid=15020
?
 
Old 02-14-2003, 06:12 AM   #3
Grim Reaper
Member
 
Registered: Apr 2002
Distribution: Gentoo 2006.0 AMD64
Posts: 399

Original Poster
Rep: Reputation: 30
I hadn't, no. But i checked them out just then and added the ip and hostname of my machine into the /etc/hosts file, and it has sped it up...but its still a tad slow actually connecting to the box, before it displays the 'login as: '...thats not too worrying as its not that slow, but it should be faster seeings as its on a LAN...

Also, how can i fix this for all other hosts? as in, if people connect from the outside world into it...its not as though i can add all those IP's in manually...
 
Old 02-14-2003, 06:21 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592
Ok, maybe let's go back to the start. Was this problem always there or has it happened overnight|over an upgrade|change in running daemons(.*config)|firewall rules|sshd_config|whatever else? If it happened after something got changed (preferably you knowing about it, LOL), can you retrace your steps? If it didn't, does this slowness happen in all public accessable services (.*requiring.login)?
 
Old 02-14-2003, 07:25 AM   #5
Grim Reaper
Member
 
Registered: Apr 2002
Distribution: Gentoo 2006.0 AMD64
Posts: 399

Original Poster
Rep: Reputation: 30
na, its been happening from the start...

how do you mean "slowness happen in all public accessable services "....as in, a HTTP service provided by the server...na, that works fine, no delays there..
 
Old 02-15-2003, 05:56 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592
Ok, then you'll have to see if you've got options in your sshd_config that makes sshd slower auth'ing the connection like reverse dns etc.
 
Old 02-16-2003, 11:48 AM   #7
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
There was a problem on at least suse with openssh 3.4 and kerberos that caused it to be horrendously slow.
Upgrading to openssh 3.5 fixed it for me, compiled myself without kerberos support (probably unnecessary I know) and its nice and zippy.
 
Old 02-17-2003, 11:59 PM   #8
Grim Reaper
Member
 
Registered: Apr 2002
Distribution: Gentoo 2006.0 AMD64
Posts: 399

Original Poster
Rep: Reputation: 30
unSpawn, I don't know what I'm really looking for in this config file...

m0rl0ck, AFAIK It's the latest ver of SSH...it came on the latest copy of Debian..
 
Old 02-18-2003, 12:41 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592
"grep /etc/ssh/sshd_config -ie reverse"
For those set to "yes" change to "no" and see if that speeds up things.
 
Old 02-21-2003, 05:28 AM   #10
Grim Reaper
Member
 
Registered: Apr 2002
Distribution: Gentoo 2006.0 AMD64
Posts: 399

Original Poster
Rep: Reputation: 30
my ssh_config didn't contain anything with reverse in it...
 
Old 02-21-2003, 01:16 PM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592
Damn, this taking way too long. I think there are 2 basic paths to follow, depending on where you think the problem may be.
If you choose sshd, then try running sshd in debug mode (sshd -d -d -d), login using ssh w verbose logging (ssh -v -v -v) and try to correlate around which part(s) it stalls. Also check if you didn't have any Rhosts(like) auth set on in ssh/sshd config.
OTOH most problems with slowness are due to DNS AFAIK (read), which means you should start checking from the bottom up (on the server and the client) with configs like /etc/resolv.conf, /etc/ns* /etc/host*, /etc/ssh/*, then on to firewall and router.
But I think you are less likely to find "something" there as you already indicated no other traffic was slow...

Anyway, whichever path you choose I think it would be wise to add your ssh(d) configs to your next post.
 
Old 02-24-2003, 05:32 AM   #12
Grim Reaper
Member
 
Registered: Apr 2002
Distribution: Gentoo 2006.0 AMD64
Posts: 399

Original Poster
Rep: Reputation: 30
ok, in the mean time while i take a look at things heres my ssh config...

Code:

godammit! I can't copy and paste it in here....got any idea's on how i can get it in here...i can't CTRL+C to copy it... btw, using mcedit and vi
 
Old 02-25-2003, 06:31 AM   #13
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592Reputation: 3592
Aw cummon, just select it with yer mouse... slackwh0re gpm/vi/links can't be *that* bad :-]
 
Old 02-25-2003, 07:09 AM   #14
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 458

Rep: Reputation: 42
Without the output from "ssh -v" it is hard to diagnose this problem. There is a lot of communication back and forth between client and host as a connection is negotiated. Hopefully I am not too ponderous here, but this communication is of course affected by the config files. In other words, that information can help as well.

Given this, with my setup and the hosts I log into, using "ssh -4 <host>" speeds up the negotiation process as it "Forces ssh to use IPv4 addresses only" . Perhaps a -2 option might help as well to force the use of protocol 2 only (since many hosts now refuse protocol 1).
 
Old 08-27-2003, 06:33 PM   #15
rguerrero
LQ Newbie
 
Registered: Jul 2003
Posts: 1

Rep: Reputation: 0
Hello, Our ssh connection from windows xp to Red Hat 9.0 was fine and then one day it got really slow. I even ssh from the linux box itself and it still takes about 30 seconds before the prompt to login appears. Have you seen this?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slow SSH response fr0zen Linux - General 7 11-19-2011 12:50 PM
FC4 Slow to authenticate with SSH dashnaam Fedora 6 02-21-2006 09:31 PM
SSH feels slow + Most memory in use? UnknownFear Linux - Newbie 2 06-23-2005 08:39 AM
SSH slow login dcass Linux - Software 2 02-16-2005 02:16 AM
ssh too slow ksgill Linux - Newbie 3 10-26-2004 04:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration