SSH slow at connect


 
Thread Tools Search this Thread
Operating Systems HP-UX SSH slow at connect
# 8  
Old 11-01-2012
Noting these lines from your log of your ssh session:

Code:
 
Last successful login: Fri Sep 28 14:52:23 METDST 2012 10.4.3.97
Last authentication failure: Fri Sep 28 14:52:16 METDST 2012 10.4.3.97
Last login: Fri Sep 28 14:52:43 2012 from 10.4.3.97

When I run a log on my HP-UX 11.31 box with:

Code:
 
ssh -v -v -v root@127.0.0.1

the lines for me give me hosts names, not IP addresses.

This means the login process is doing a revese lookup on the IP address to provide a host name, and that requires it either have the entry in /etc/hosts, or the hosts be correctly set up to use dns.

For your servers that do not have an /etc/resolv.conf file, you are not set up correctly to use dns and this means that the delay is most likely caused by the reverse lookup timing out, because the host can't find a dns server to use (how could it? It's not configured.)

For the systems that do have an /etc/resolv.conf file, you may want to check that the XXX and YYY servers are actually dns servers, and you can ping them from the current host in question, and that you are searching on the correct network domain(s).

As a simple test ... on the system that does not have an /etc/resolv.conf file set up,
can you change the /etc/nsswitch.conf file hosts entry to:

Code:
hosts: files

removing the rest of the line? In this way you tell the system not to look for a dns server if you can't find the entry in /etc/hosts, and therefore it will decide to return the IP Address on the reverse lookup more quickly.
This User Gave Thanks to rwuerth For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Slow ssh on Solaris 10 zone

ssh is slow on solaris zone , and is getting stuck at the following place. debug2: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768 debug3: Wrote 664 bytes for a total of 3325 Below is the ssh version being used: Sun_SSH_1.1.6, SSH protocols 1.5/2.0, OpenSSL 0x0090704f ... (10 Replies)
Discussion started by: skamal4u
10 Replies

2. SuSE

SLES 11.2 slow SSH password prompt

We are having an issue with slow password prompts via SSH login on all of our SLES 11.2 boxes. The output from a ssh -v login attempt shows a delay here: debug1: SSH2_MSG_SERVICE_ACCEPT receivedThis issue only happens on the first logon of the day; subsequent logons are normal. Adding the client's... (8 Replies)
Discussion started by: j_aix
8 Replies

3. Solaris

Slow ssh connection after patching

I have Solaris-10 server which was patched by patch cluster last weekend. After patching, it connects slow with other server. Meaning, when I do - ssh server2 OR ssh wluser2@server2 OR ssh root@server2 It waits for 9-10 seconds and then prompt for password, while it used to be instant... (2 Replies)
Discussion started by: solaris_1977
2 Replies

4. Shell Programming and Scripting

Net::SSH::Perl slow to login.

I have some sample code that's supposed to ssh to another machine using Net::SSH::Perl, execute a command, and print the output of that command. It's very basic, and it works. However, I noticed that upon logging in: $ssh->login('username','password'); It takes roughly 10-13 seconds to... (2 Replies)
Discussion started by: mrwatkin
2 Replies

5. Solaris

Slow login via SSH

Hi Guys and Girls, I know this is a common question but I've searched and we've tried the suggestions without luck. When I log into the box via SSH from a windows machine I get a 1 min 20 sec delay. If we add my IP address and machine name to /etc/hosts then I get an instant login. I would be happy... (12 Replies)
Discussion started by: MikeKulls
12 Replies

6. Solaris

ssh very slow

I'm facing a problem when trying to ssh to SUN servers with solaris OS,it takes a long time until prompted for password ..after connecting to the server everything work fine..how can I solve this issue??? (11 Replies)
Discussion started by: mm00123
11 Replies

7. IP Networking

Samba Slow to Connect Xp to Solaris

Hi everyone, I posted this on the Solaris forums but so far no one has been able to help... I'm new to solaris and I've installed 10, update 5. I've configured samba (very badly I believe) so that I can access my solaris box from my XP 64 computer. Both are on a local network (connected via... (1 Reply)
Discussion started by: ciscocbee
1 Replies

8. UNIX for Dummies Questions & Answers

Painfully Slow SSH login on Solaris box

Running open solaris on a e420 that I recently picked up. Having issues sshing to it from either of my Linux boxes as its very slow to login (from the solaris box to the linux box it connects just fine. Here is the output of ssh -vvv. I have hightlighted where it seems the slowdown is. Does... (0 Replies)
Discussion started by: creedog
0 Replies

9. UNIX for Dummies Questions & Answers

SSH and FTP connect slow

Hi again guys, Earlier today, just all of a sudden, all SSH and FTP connections to my internal Linux box just slowed down to a crawl. After the connection/authentication though, everything was back to normal speed. Until you have to connect again. A box reboot didnt work either. Now, from... (1 Reply)
Discussion started by: Aeros
1 Replies

10. BSD

ipfw slow ssh and ftp connections

just as the title says. thanks. #General Rule Sets /sbin/ipfw add 0300 check-state /sbin/ipfw add 0301 deny tcp from any to any in established /sbin/ipfw add 0302 pass tcp from any to any out setup keep-state /sbin/ipfw add 0303 pass udp from any to any out #SSH FTP /sbin/ipfw add 0400... (11 Replies)
Discussion started by: dwildgoose
11 Replies
Login or Register to Ask a Question