Index: [Article Count Order] [Thread]

Date:  Thu, 29 Nov 2007 20:11:50 -0800
From:  "Ken Marcus - Precision Web Hosting, Inc." <kenmarcus (at mark) precisionweb.net>
Subject:  [coba-e:11319] Re: very slow authentication
To:  <coba-e (at mark) bluequartz.org>
Message-Id:  <005e01c83307$230fe110$6700a8c0@OfficeKen>
References:  <474F1E88.6020308 (at mark) nomealaska.org>
X-Mail-Count: 11319


Jim Dory wrote:
> My new MSI bluequartz server is pretty slow when using ssh or winscp. I 
> fire up putty and user login pops up pretty quick, but when I enter the 
> password it takes up to something like 24 seconds or more. This is enough 
> to cause winscp to time-out before it connects.
>
> I'm looking through the archive but not sure what the answer is - I've 
> seen reference to a db management vs. flat file - but not sure yet if this 
> applies. What else might I look at? Pretty stock otherwise.
>
> cheers, Jim
>
> -- 
> Jim Dory
> Engineering
> City of Nome
> PO Box 281
> 102 Division St.
> Nome, AK 99762
> 907.443.6604
>
> http://www.nomealaska.org
>
>


Jim

You might try adding these  lines to the /etc/ssh/sshd_config


UseDNS no
RSAAuthentication no # Skips RSA Authentication (saves time).
PubkeyAuthentication no # Pubkey Authentication (saves time).
RhostsRSAAuthentication no # Not using this one either (saving more time).
HostbasedAuthentication no # No reason to resolve just based on the host.
PasswordAuthentication yes # This is what I'm using to log in


If your  dns is slow then the first "UseDNS no" line will probably help the 
most.

Then
/etc/rc.d/init.d/sshd restart


Also, for security I also add the lines below so only ssh2 will work, only 
the admin and root users can ssh, and, even though it is redundant, I also 
disallow the user test.
Protocol 2
AllowUsers admin root
DenyUsers test



As long as I am looking at my setup steps info,  I also only alow the root 
user to have crons. This stops users like apache from having crons. So, if 
you have a php exploit with the privileges of apache, then they can't create 
a cron to restart their "whatever they are running" every minute as you try 
to shut it down.

To do that you would use the command below:
echo "root" >> /etc/cron.allow





----

Ken Marcus

Ecommerce Web Hosting by

Precision Web Hosting, Inc.

http://www.precisionweb.net