Can not connect to linux machine through SSH

Posted on 2005-05-17
Last Modified: 2012-08-13
Hi ,I want to connect to linux machine through SSH to delete some file from /usr/local/
use strict;
use Net::SSH::Perl;
$host = "";
$username = "root";
$old_password = "root";
my $ssh = Net::SSH::Perl->new($host, debug => 1, protocol => 2);
$ssh->login($username, $old_password);

Use of uninitialized value in concatenation (.) or string at C:/Perl/lib/Net/SSH
/ line 107.
Reading configuration data /.ssh/config
Reading configuration data /etc/ssh_config
Connecting to, port 22.
Remote protocol version 2.0, remote software version OpenSSH_3.7.1p2
 Net::SSH::Perl Version 1.27, protocol version 2.0.
Use of uninitialized value in concatenation (.) or string at C:/Perl/lib/Net/SSH
/Perl/ line 41, <GEN0> line 1.
Use of uninitialized value in concatenation (.) or string at C:/Perl/lib/Net/SSH
/Perl/ line 47, <GEN0> line 1.
No compat match: OpenSSH_3.7.1p2.
Can't set socket non-blocking: Bad file descriptor at C:/Perl/lib/Net/SSH/Perl.p
m line 212, <GEN0> line 1.

Where the problem ? I can connect to this machine when I use SSH Secure Shell Client

May be I can use another mdules to perform deletion ,when I use ftp module ,this directory /usr/local doesn't exist .

Wait for help ,

Question by:Irina_dusha
    LVL 48

    Expert Comment

    How did you install Net::SSH::Perl?

    What version of Perl are you running?

    Expert Comment

    Just copied modules to Net/SSH,

    Expert Comment

    I think you just copied this module ,you should insert to CPAN shell
    and then write install Net::SSH::Perl
    maybe this will help you
    LVL 48

    Expert Comment

    I'm confused.

    Vlad77 are you the same person as Irina?

    Author Comment

    I can not install  Net::SSH::Perl from cpan ,I have some problem with

    C:\>"C:\Program Files\Microsoft Visual Studio\VC98\Bin\NMAKE.EXE file

    what's the connection to perl module ???Maybe I don't understand something ?
    LVL 48

    Accepted Solution


    Are you running ActiveState Perl?

    See for installing Net::SSH

    Author Comment

    Tintin ,thanks a lot

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (,  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
    In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (…
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    This video discusses moving either the default database or any database to a new volume.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now