Click here to get back home

Net:SSH::Perl oddity when logging in to SSH V2 Server

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Net:SSH::Perl oddity when logging in to SSH V2 Server tgp 01-16-2006
Posted by tgp on January 16, 2006, 7:03 am
Please log in for more thread options


here is the deal. if I am connecting to a server which only supports V1

of SSH the connect time is 1-2 seconds, but if I connect to a remote
server that requires V2 then the connect time is


here are the respctive calls and the parameters I am using.


%params= (
'protocol' => "1,2",
'compression' => "on"
);


$ses = Net::SSH::Perl->new($host,%params) # takes less than a second


$ses->login($hostArr,$hostArr) # takes
about 240 second


Timings look like this:
BEGIN Processing dfsdb03 1137175894
BEGIN Got Session Handle Processing dfsdb03 1137175895
BEGIN Logged into Session Processing dfsdb03 1137176157


The numbers at the end are the output from time which is in seconds.


here is the output I get from the debug option:


tbsdb05: Reading configuration data /opt/home/tpeterm/.ssh/config
tbsdb05: Reading configuration data /etc/ssh_config
tbsdb05: Connecting to dfsdb03, port 22.
tbsdb05: Remote protocol version 2.0, remote software version 3.2.5 SSH

Secure S hell
(non-commercial)
tbsdb05: Net::SSH::Perl Version 1.29, protocol version 2.0.
..bsdb05: No compat match: 3.2.5 SSH Secure Shell (non-commercial)
tbsdb05: Connection established.
BEGIN Got Session Handle Processing dfsdb03 1137175895
tbsdb05: Sent key-exchange init (KEXINIT), wait response.
tbsdb05: Algorithms, c->s: 3des-cbc hmac-sha1 zlib
tbsdb05: Algorithms, s->c: 3des-cbc hmac-sha1 zlib
tbsdb05: Entering Diffie-Hellman Group 1 key exchange.
tbsdb05: Sent DH public key, waiting for reply.
tbsdb05: Received host key, type 'ssh-dss'.
tbsdb05: Host 'dfsdb03' is known and matches the host
key.
tbsdb05: Computing shared secret key.
tbsdb05: Verifying server signature.
tbsdb05: Waiting for NEWKEYS message.
tbsdb05: Enabling incoming encryption/MAC/compression.
tbsdb05: Send NEWKEYS, enable outgoing encryption/MAC/compression.
tbsdb05: Sending request for user-authentication service.
tbsdb05: Service accepted: ssh-userauth.
tbsdb05: Trying empty user-authentication request.
tbsdb05: Authentication methods that can continue: publickey,password.
tbsdb05: Next method to try is publickey.
tbsdb05: Next method to try is password.
tbsdb05: Trying password authentication.
tbsdb05: Login completed, opening dummy shell channel.
tbsdb05: channel 0: new [client-session]
tbsdb05: Requesting channel_open for channel 0.
tbsdb05: channel 0: open confirm rwindow 100000 rmax 16384
tbsdb05: Got channel open confirmation, requesting shell.
tbsdb05: Requesting service shell on channel 0.
BEGIN Logged into Session Processing dfsdb03 1137176157
tbsdb05: channel 1: new [client-session]
tbsdb05: Requesting channel_open for channel 1.
tbsdb05: Entering interactive session.
tbsdb05: Sending command: date
tbsdb05: Requesting service exec on channel 1.
tbsdb05: channel 1: open confirm rwindow 100000 rmax 16384
tbsdb05: input_channel_request: rtype exit-status reply 0
tbsdb05: channel 1: rcvd close
tbsdb05: channel 1: output open -> drain
tbsdb05: channel 1: input open -> closed
tbsdb05: channel 1: close_read
tbsdb05: channel 1: obuf empty
tbsdb05: channel 1: output drain -> closed
tbsdb05: channel 1: close_write
tbsdb05: channel 1: send close
tbsdb05: channel 1: full closed


Anyone have any idea what is going on here?


Thanks,


Tony



Similar ThreadsPosted
logging delays via "logger", tried "Sys::Syslog" but I get nothing ... January 21, 2005, 3:25 pm
Using Net::Telnet to connect to Perl server January 22, 2005, 12:57 am
Finding out the time on an FTP server using perl August 30, 2005, 5:27 am
MS SQL server and SQL DATETIME manipulation in perl April 29, 2005, 2:23 am
net::ssh::Perl connecting to f-secure ssh server October 10, 2007, 4:07 am
Net::SSH::Perl to connect to a remote server via a web page August 30, 2004, 10:02 am
Microsoft SQL Server 2000 perl module November 11, 2004, 2:12 am
Announce: Win32::SqlServer - access SQL Server from Perl November 27, 2005, 5:03 pm
Net::Server -> tftpd ? May 28, 2006, 6:21 am
TACACS+ with Cisco ACS server 3.2 August 6, 2004, 10:26 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap