why is perl::ssh so slow ?

Discussion in 'Perl Misc' started by Reinhard Glauber, Jan 5, 2006.

  1. if I use putty to connect to a ssh server it takes just 1 or 2 seconds

    but with the perl::ssh module it takes about 10 seconds, and the "dir" command is not executed (its openssh on a windows machine)

    thanks

    use Net::SSH::perl;

    my $host = '192.168.3.235';
    my $user = 'susi';
    my $cmd = 'dir';
    my $password = 'helpme';

    my $ssh = Net::SSH::perl->new($host, port=>22);

    $ssh->login($user, $password);
    my($out, $err) = $ssh->cmd($cmd);
    print $out;
     
    Reinhard Glauber, Jan 5, 2006
    #1
    1. Advertising

  2. Reinhard Glauber

    Samwyse Guest

    What is this 'perl::ssh' of which you speak? I've never heard of it,
    and CPAN doesn't seem to know of it, either.
     
    Samwyse, Jan 5, 2006
    #2
    1. Advertising

  3. Reinhard Glauber

    Brian Wakem Guest

    Reinhard Glauber wrote:
    > ok, here ist the debug-output .. if it helps ;-)
    >
    > nobody: Reading configuration data /home/Explorer/.ssh/config
    > nobody: Reading configuration data /etc/ssh_config
    > nobody: Connecting to 192.168.3.235, port 22.
    > nobody: Remote protocol version 2.0, remote software version OpenSSH_3.8.1p1
    > nobody: Net::SSH::perl Version 1.29, protocol version 2.0.
    > nobody: No compat match: OpenSSH_3.8.1p1.
    > nobody: Connection established.
    > nobody: Sent key-exchange init (KEXINIT), wait response.
    > nobody: Algorithms, c->s: 3des-cbc hmac-sha1 none
    > nobody: Algorithms, s->c: 3des-cbc hmac-sha1 none
    > nobody: Entering Diffie-Hellman Group 1 key exchange.
    > nobody: Sent DH public key, waiting for reply.
    > nobody: Received host key, type 'ssh-dss'.
    > nobody: Host '192.168.3.235' is known and matches the host key.
    > nobody: Computing shared secret key.
    > nobody: Verifying server signature.
    > nobody: Waiting for NEWKEYS message.
    > nobody: Enabling incoming encryption/MAC/compression.
    > nobody: Send NEWKEYS, enable outgoing encryption/MAC/compression.
    > nobody: Sending request for user-authentication service.
    > nobody: Service accepted: ssh-userauth.
    > nobody: Trying empty user-authentication request.



    This could be the problem. You will get a ~3 seconds delay after a
    failed login attempt on most unix/linux systems.



    --
    Brian Wakem
    Email: http://homepage.ntlworld.com/b.wakem/myemail.png
     
    Brian Wakem, Jan 5, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,006
    Smokey Grindel
    Dec 2, 2006
  2. loial
    Replies:
    0
    Views:
    406
    loial
    Feb 3, 2009
  3. loial
    Replies:
    0
    Views:
    406
    loial
    Feb 10, 2009
  4. Tench Johnson
    Replies:
    1
    Views:
    299
    Biff Tannen
    Apr 23, 2010
  5. salamond

    net/ssh in ruby. ssh.exec fails

    salamond, Feb 17, 2011, in forum: Ruby
    Replies:
    0
    Views:
    248
    salamond
    Feb 17, 2011
Loading...

Share This Page