LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-17-2007, 08:16 AM   #1
elnacho12
LQ Newbie
 
Registered: Apr 2007
Posts: 4

Rep: Reputation: 0
Question Public key authentication with ssh


Hi falks,

I've followed the procedures posted here in another thread, making successful the ssh/scp authentication between two servers.

The fact is that I have a web application which use a shell script to copy (scp) some files to both servers in order to duplicate the uploaded files from the web appl.
This was working very good but in the last few weeks the time it took to establish an ssh conection between both servers was too low!!! (8 seconds average)

Both hosts are virtual servers in a same phisical server, so the time between conections should be nothing more than some mili seconds.

Has someone any clue about where should I investigate the origin of this delay?

Thanks,

Ignacio Nieto
 
Old 12-17-2007, 08:28 AM   #2
complich8
Member
 
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 15
could be DNS lookups. Try either adding both machine's ip addresses to the other machine's /etc/hosts or turning off UseDNS in your sshd_config ...

could be other things too though. If that doesn't help, try tacking on a -vvv to your ssh command and seeing what step of the connection it is hanging at.
 
Old 12-18-2007, 09:32 AM   #3
elnacho12
LQ Newbie
 
Registered: Apr 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Re: Public key authentication with ssh

Quote:
Originally Posted by complich8 View Post
could be DNS lookups. Try either adding both machine's ip addresses to the other machine's /etc/hosts or turning off UseDNS in your sshd_config ...

could be other things too though. If that doesn't help, try tacking on a -vvv to your ssh command and seeing what step of the connection it is hanging at.
Hi! thanks a lot!
Here's is the delay:

root@cds-desa # ssh -vvv 10.252.68.78
Sun_SSH_1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
debug1: Reading configuration data /etc/ssh/ssh_config
...
debug2: we sent a keyboard-interactive packet, wait for reply
//Here it takes an average of 8 secs.
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:
//After entering the passwd it's all ok.

Why does it takes such long time answering the keyboard-interactive packet?
 
Old 12-18-2007, 09:38 AM   #4
elnacho12
LQ Newbie
 
Registered: Apr 2007
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by complich8 View Post
could be DNS lookups. Try either adding both machine's ip addresses to the other machine's /etc/hosts or turning off UseDNS in your sshd_config ...

could be other things too though. If that doesn't help, try tacking on a -vvv to your ssh command and seeing what step of the connection it is hanging at.
I've tried also between two servers which are authenticated with a public key and doesn't ask the passwd to each other and threw me:

debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
//Here it holds 8 secs
debug1: Connecting to cds-fe2 [10.252.68.114] port 22.
debug1: Connection established.
debug1: identity file /.ssh/identity type -1
debug1: identity file /.ssh/id_rsa type -1
debug3: Not a RSA1 key file /.ssh/id_dsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: no key found
debug3: key_read: no space
...
 
  


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
ssh public key authentication teacup Linux - Networking 4 11-28-2011 12:27 AM
ssh public key authentication problem flgal3 Linux - Software 21 02-06-2009 12:15 PM
SSH Public Key Authentication - how secure is it? moistTowelette Linux - Security 7 10-31-2007 06:47 PM
Public Key Authentication with SSH edafe Ubuntu 1 08-26-2006 12:06 PM
Can't use public key authentication with SSH Noob69 Linux - General 5 01-06-2006 07:27 AM


All times are GMT -5. The time now is 01:06 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration