Slow login via SSH


 
Thread Tools Search this Thread
Operating Systems Solaris Slow login via SSH
# 8  
Old 09-07-2010
My first guess would have been the lookup; but a few useful steps in troubleshooting:

Startup another instance of sshd in debug mode. As root:

# ./sshd -ddd -p 922

In another window, start a snoop and collect information for Wireshark. You may not need it in the end, but better to collect as much info as possible:

# snoop -s 1500 -o /tmp/sshd.log port 922 (may have to use -d if using a particular interface)

Now you'll want to make 2 connections. First, connect from the windows host, watch for errors or where it "blocks". You can then connect locally from the host and look at the difference. Good luck,

Keith Duffin
# 9  
Old 09-07-2010
if the server cannot reach any DNS server then disable the use of DNS - /etc/nsswitch.conf
# 10  
Old 09-08-2010
Quote:
Originally Posted by shitson
Is there a MOTD that appears when you login?

try doing a ssh -v or ssh -vv or ssh -vvv to view the 3 levels of debugging to determine where the system is getting stuck at.

Also what specs is your system running?
Sorry for the delay everyone, I've been busy the last week. There is a very stern motd warning me that I will go to jail if I push the wrong keys :-) It doesn't appear until after the delay. When I debug with all 3 levels of debugging it pauses in pretty much the same 2 spots. I'm sure there's some information I can't print in all that so I'll have to post just the messages where it pauses:

debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
...... 20 second pause here

debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Entering interactive session.
...... 20 second pause here

Does that help any?

With regards to the system specs how would I find out?

---------- Post updated at 03:57 PM ---------- Previous update was at 03:55 PM ----------

Quote:
Originally Posted by SmartAntz
This might be the the server DNS setting problem. Assuming it can't reach a dns server, suggest is use your previous method to solve it
We did that and it worked, the problem is that I am natted somewhere between here and the server and although my IP does not change the nat IP does. So the fix only lasted a day or so.

---------- Post updated at 04:01 PM ---------- Previous update was at 03:57 PM ----------

Quote:
Originally Posted by frank_rizzo
if the server cannot reach any DNS server then disable the use of DNS - /etc/nsswitch.conf
We tried this and it halved the delay from 80 seconds down to 40. Does it still look in /etc/resolv.conf also? My thinking was there was 2 DNS servers in nsswitch.conf and 2 in resolv.conf so we have halved the number of lookups. Does that sound reasonable?

---------- Post updated at 04:03 PM ---------- Previous update was at 04:01 PM ----------

Quote:
Originally Posted by kduffin
My first guess would have been the lookup; but a few useful steps in troubleshooting:

Startup another instance of sshd in debug mode. As root:

# ./sshd -ddd -p 922

In another window, start a snoop and collect information for Wireshark. You may not need it in the end, but better to collect as much info as possible:

# snoop -s 1500 -o /tmp/sshd.log port 922 (may have to use -d if using a particular interface)

Now you'll want to make 2 connections. First, connect from the windows host, watch for errors or where it "blocks". You can then connect locally from the host and look at the difference. Good luck,

Keith Duffin
Thanks for the reply Keith. Unfortunately I wouldn't be able to get root access
# 11  
Old 09-08-2010
You don't have to have root if you use a non-privileged port. Just pick one above 1024... (assuming default config) 1922 for instance. The kicker will be firewalls allowing inbound requests, but that wouldn't stop you for some debugging. You could also use ssh's port forwarding to steer around the firewall if needs be.
# 12  
Old 09-08-2010
Quote:
Originally Posted by kduffin
You don't have to have root if you use a non-privileged port. Just pick one above 1024... (assuming default config) 1922 for instance. The kicker will be firewalls allowing inbound requests, but that wouldn't stop you for some debugging. You could also use ssh's port forwarding to steer around the firewall if needs be.
I gave it a try but just running snoop I get permission denied. I guess if I run it via cygwin on this end it's not going to give me the info I need. It looks like this is pretty much a dns issue based on the replies here.
# 13  
Old 09-08-2010
Likely the case; it's the normal issue with ssh on Solaris, but not always. And sorry, yes, you can run sshd as a non-privileged user, but snoop does require root.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Slow login with rexec.

Hi all, I´m replacing an old linux enterprise redhat 4.5 by a new one linux enterprise redhat 6. In both I use rexec as a communication between the front end and the user. In the old one, when the user connects, the communication establishes quickly (less than 3 sec). But in the new one, the... (1 Reply)
Discussion started by: mig28mx
1 Replies

2. UNIX for Advanced & Expert Users

OEL 6.3 :Slow login due to /etc/ssh/sshd_config configuration

Version: Oracle Enterprise Linux 6.3 Running on VMWare Workstation When I login to my Linux VM from putty, the third line prompting for password comes only after few seconds. login as: root Access denied root@192.168.0.235's password: ---> It takes around 5 seconds to get this prompt I... (1 Reply)
Discussion started by: John K
1 Replies

3. HP-UX

SSH slow at connect

Hi experts, We are getting slow ssh session connections at HP-UX 11.31 servers. We have set the parameters that maybe will affect , and commented at other theads at config file sshd_config : UseDNS no X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost no GSSAPIAuthentication no. ... (7 Replies)
Discussion started by: SapBasisSystem
7 Replies

4. Solaris

Open Indiana 151a - Slow SSH Login

Hi, I have the following issue, when I tried to login to an Openindiana remote server through ssh It takes to long to ask me for the password. So i tried -v and I realize that sshd hangs here " debug1: SSH2_MSG_SERVICE_ACCEPT received " for at least 2 minutes. Then I can log in and everything is... (2 Replies)
Discussion started by: piukeman
2 Replies

5. 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

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. Solaris

Slow Login

Hi All, I have problem when i write my user name to login to my server late (about 10 min) to give me field of password if u know how i can solve it? Thanks (4 Replies)
Discussion started by: mass1123
4 Replies

8. UNIX for Dummies Questions & Answers

Really slow login... any ideas why?

Hi, Quick question, I'm messing about with a test box at work (system v) Basically I telnet to the server. Get the following : SunOS 5.9 login: (my name) Password: (my password) Last login: Thu Feb..... yada yada (At this stage it takes over a minute to come to display the... (5 Replies)
Discussion started by: kenny123m
5 Replies

9. 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

10. Solaris

Solaris 9 slow login thru ssh & ftp

When I ssh to my box, an Ultra 5. I get prompted for password immediately. I enter it and have to wait sometimes a full minute for it to prompt for a password. The same thing happens when i try to ftp to the box, it will say connected, but it takes forever to prompt for password, and... (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies
Login or Register to Ask a Question