?
Solved

Can not connect to linux machine through SSH

Posted on 2005-05-17
7
Medium Priority
?
369 Views
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 = "10.8.0.252";
$username = "root";
$old_password = "root";
my $ssh = Net::SSH::Perl->new($host, debug => 1, protocol => 2);
$ssh->login($username, $old_password);

Output
-------
Use of uninitialized value in concatenation (.) or string at C:/Perl/lib/Net/SSH
/Perl.pm line 107.
Reading configuration data /.ssh/config
Reading configuration data /etc/ssh_config
Connecting to 10.8.0.252, 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/SSH2.pm line 41, <GEN0> line 1.
Use of uninitialized value in concatenation (.) or string at C:/Perl/lib/Net/SSH
/Perl/SSH2.pm 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 ,
Thanks

0
Comment
Question by:Irina_dusha
  • 3
  • 2
  • 2
7 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 14024275
How did you install Net::SSH::Perl?

What version of Perl are you running?
0
 

Expert Comment

by:Vlad77
ID: 14024864
Just copied modules to Net/SSH,
0
 

Expert Comment

by:Vlad77
ID: 14024874
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
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 48

Expert Comment

by:Tintin
ID: 14032342
I'm confused.

Vlad77 are you the same person as Irina?
0
 

Author Comment

by:Irina_dusha
ID: 14034150
Vlad77,
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 ?
0
 
LVL 48

Accepted Solution

by:
Tintin earned 400 total points
ID: 14042790
Irina.

Are you running ActiveState Perl?

See http://www.soulcage.net/ppds/ for installing Net::SSH
0
 

Author Comment

by:Irina_dusha
ID: 14054018
Tintin ,thanks a lot
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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…
Six Sigma Control Plans
Suggested Courses

864 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