Re: Quick Net::SSH::Perl question



Michael Alipio wrote:
Hi,

My program looks like this:

#!/usr/local/bin/perl
use warnings;
use strict;
use Net::SSH::Perl;

my $host = '192.168.1.1';
my $user = 'user';
my $pass = 'password';

my $ssh = Net::SSH::Perl->new($host);
$ssh->login($user, $pass);
$ssh->shell;

It spawns a shell successfully but takes too long during the:

SSH: kex: client->server 3des-cbc hmac-sha1 none
SSH: mac_init: found hmac-sha1
SSH: kex: server->client 3des-cbc hmac-sha1 none
SSH: dh_gen_key: priv key bits set: 196/384
SSH: bits set: 514/1024
SSH: expecting SSH2_MSG_KEXDH_INIT

I guess this is the process I'm seeing when I ssh into a new server and it
> cannot find that host's fingerprint in my ~/.ssh/known_host..
I tried copying ~/.ssh/known_host ~/.ssh/identity but still takes too long.
I tried copying /etc/ssh/id_rsa ~/.ssh/identity but still takes too long.

The docs says:
" Net::SSH::Perl->new($host, %params)

To set up a new connection, call the new method, which connects to $host and
returns a Net::SSH::Perl object.

new accepts the following named parameters in %params:"

I want to set the debug param to see what is happening behind my script, but
I'm not really sure how to set this param thing..
Any idea?

my $ssh = Net::SSH::Perl->new($host, debug => 1);

Rob
.



Relevant Pages

  • RE: sshd / ssh setup
    ... We have an Remote FreeBSD system which is located some where on the ... This method gives the maximum protection possible utilizing ssh. ... Host setup steps. ... Reboot your system to activate sshd and login as root. ...
    (freebsd-questions)
  • SSH filter transer, was Re: Soft Update - directory/file listing
    ... But SSH file transfer is painfully slow all the time. ... ## SSH 3.2 Server Configuration File ... # Note that forwardings using the name of this host will be allowed (if ...
    (freebsd-performance)
  • Re: [opensuse] Re: OpenSUSE PuTTY ?
    ... PuTTY lets you set up all kinds of special options, tied to which host ... The ssh daemon on the host machine is usually activated by default, ... As a taster to open a remote session in a new window in any konsole ... Windows users should explore Cygwin as this will allow you to run ssh ...
    (SuSE)
  • Re: Disable name canonicalization for OpenSSH GSSAPI
    ... The issue I'm having is with a new server ... I'm unable to setup the correct reverse ... When I attempt to connect to this host with SSH, ...
    (comp.protocols.kerberos)
  • Re: hacked?
    ... So I ssh'd in and did a netstat and saw what looked like an unwanted SSH connection... ... On the local host type nmap -sV localhost -p 1-65535 to see what ports respond and which apps/services. ...
    (comp.os.linux.misc)