Sponsored Content
Top Forums Shell Programming and Scripting Net::SSH::Perl slow to login. Post 302507001 by mrwatkin on Tuesday 22nd of March 2011 12:57:28 PM
Old 03-22-2011
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:
Code:
$ssh->login('username','password');

It takes roughly 10-13 seconds to complete. After that, executing the commands are fast, but I'd like to be able to shorten
the lengthy login process. Have any of you experienced this? I believe I'm using SSH2. When I try to use SSH1, it kicks back
an error about Math::GMP:

Code:
localmachine: Reading configuration data /export/home/user/.ssh/config
localmachine: Reading configuration data /etc/ssh_config
localmachine: Connecting to server.com, port 22.
localmachine: Remote version string: SSH-2.0-Sun_SSH_1.1.3

localmachine: Remote protocol version 2.0, remote software version Sun_SSH_1.1.3
Can't load '/opt/ActivePerl-5.8/lib/site_perl/5.8.8/x86-solaris-thread-multi/auto/Math/GMP/GMP.so' for module Math::GMP: ld.so.1: perl-static: fatal: libgmp.so.3: open failed: No such file or directory at /opt/ActivePerl-5.8/lib/5.8.8/x86-solaris-thread-multi/DynaLoader.pm line 230.
 at /opt/ActivePerl-5.8/lib/site_perl/5.8.8/Net/SSH/Perl/Util/SSH1MP.pm line 7
Compilation failed in require at /opt/ActivePerl-5.8/lib/site_perl/5.8.8/Net/SSH/Perl/Util/SSH1MP.pm line 7.
BEGIN failed--compilation aborted at /opt/ActivePerl-5.8/lib/site_perl/5.8.8/Net/SSH/Perl/Util/SSH1MP.pm line 7.
Compilation failed in require at /opt/ActivePerl-5.8/lib/site_perl/5.8.8/Net/SSH/Perl/Util.pm line 56.
BEGIN failed--compilation aborted at /opt/ActivePerl-5.8/lib/site_perl/5.8.8/Net/SSH/Perl/Key/RSA1.pm line 6.
Compilation failed in require at /opt/ActivePerl-5.8/lib/site_perl/5.8.8/Net/SSH/Perl/SSH1.pm line 13.
BEGIN failed--compilation aborted at /opt/ActivePerl-5.8/lib/site_perl/5.8.8/Net/SSH/Perl/SSH1.pm line 13.
Compilation failed in require at /opt/ActivePerl-5.8/lib/site_perl/5.8.8/Net/SSH/Perl.pm line 54.


Last edited by mrwatkin; 03-24-2011 at 09:22 AM..
 

10 More Discussions You Might Find Interesting

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

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

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

4. Shell Programming and Scripting

Net::SSH::Perl ...... how to print the output in a proper format

Hi Guys, my $cmd = "ls -l"; #........ {or let it be as # my $cmd= "ls"; } my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); print $stdout; the script works fine, but i am unable to see the output getting displayed in a... (7 Replies)
Discussion started by: gsprasanna
7 Replies

5. Shell Programming and Scripting

Net::SSH::Perl->Execute any unix command & display the output in a proper form

Net::SSH::Perl ...... how to print the output in a proper format my $cmd = "ls -l"; my $ssh = Net::SSH::Perl->new($host); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); print $stdout; the script works fine, but i am unable to see the output... (2 Replies)
Discussion started by: gsprasanna
2 Replies

6. Shell Programming and Scripting

could not send commands SSH session with Net::SSH::Expect

I am using Net::SSH::Expect to connect to the device(iLO) with SSH. After the $ssh->login() I'm able to view the prompt, but not able to send any coommands. With the putty I can connect to the device and execute the commands without any issues. Here is the sample script my $ssh =... (0 Replies)
Discussion started by: hansini
0 Replies

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

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

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

10. 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
ltsp-update-sshkeys(8)					      System Manager's Manual					    ltsp-update-sshkeys(8)

NAME
ltsp-update-sshkeys - Update LTSP chroots to trust the server ssh keys SYNOPSIS
ltsp-update-sshkeys [OPTION] [host...] DESCRIPTION
If any hosts are specified, their SSH keys are exported in a file, by default /etc/ltsp/ssh_known_hosts.auto. Otherwise, all LTSP chroots are updated to trust the SSH keys of this server along with any additional keys in /etc/ltsp/ssh_known_hosts.* files. OPTIONS
-b --base Base of ltsp chroot. Default is /opt/ltsp if unspecified. -e --export File name to export the hosts SSH keys to (- for stdout). Default is /etc/ltsp/ssh_known_hosts.auto if unspecified. -h --help The application help page. -p --port SSH port for remote servers. -u --update Update the chroot SSH keys even if hosts are specified. SEE ALSO
ltsp-build-client(8), ltsp-update-kernels(8), ssh-keyscan(1), sshd(8). AVAILABILITY
ltsp-update-sshkeys is part of ltsp package and the latest versions are available in source form from https://launchpad.net/ltsp. MAN PAGE AUTHOR
Copyright 2012 Alkis Georgopoulos <alkisg@gmail.com>, distributed under the terms of the GNU General Public License version 2 or any later version. 2012-05-28 ltsp-update-sshkeys(8)
All times are GMT -4. The time now is 09:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy