LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 07: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, 07:28 AM   #2
complich8
Member
 
Registered: Oct 2007
Distribution: rhel, fedora, gentoo, ubuntu, freebsd
Posts: 104

Rep: Reputation: 17
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, 08: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, 08: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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

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
Open Source Consulting | Domain Registration