Net:SSH::Perl oddity when logging in to SSH V2 Server
am 16.01.2006 16:03:07 von TonyPetermanhere 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{$host}{"USER"},$hostArr{$host}{"PASS"}) # 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