Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Net::SSH::Perl -> OpenSSH on Windows Server?

Reply
Thread Tools

Net::SSH::Perl -> OpenSSH on Windows Server?

 
 
IanW
Guest
Posts: n/a
 
      06-20-2007
Hi

Has anyone tried connecting from a Linux box using Net::SSH:erl to a
Windows server running OpenSSH?

That is, I am testing using this script:

use Net::SSH:erl;
my $host = "10.10.10.10";
my $user = "username";
my $pass = "password";
my $ssh = Net::SSH:erl->new($host, (debug => 1));
$ssh->login($user, $pass);
my $cmd = 'dir';
my($stdout,$stderr,$exit) = $ssh->cmd($cmd);
print "stdout=$stdout \nstderr=$stderr \nexit=$exit\n";

The debug lines I get seem to indicate a successful connection (not copied
all the lines as there are alot):

timberwindows.com: channel 1: new [client-session]
timberwindows.com: Requesting channel_open for channel 1.
timberwindows.com: Entering interactive session.
timberwindows.com: Sending command: dir > c:\TW.com\zzzzzz.txt
timberwindows.com: Requesting service exec on channel 1.
timberwindows.com: channel 1: open confirm rwindow 0 rmax 32768
timberwindows.com: input_channel_request: rtype exit-status reply 0
timberwindows.com: channel 1: rcvd eof
timberwindows.com: channel 1: output open -> drain
timberwindows.com: channel 1: rcvd close
timberwindows.com: channel 1: input open -> closed
timberwindows.com: channel 1: close_read
timberwindows.com: channel 1: obuf empty
timberwindows.com: channel 1: output drain -> closed
timberwindows.com: channel 1: close_write
timberwindows.com: channel 1: send close
timberwindows.com: channel 1: full closed
stdout=
stderr=
exit=255

As one can see $stdout contains nothing.. it works fine if I Putty into the
Linux box and use the ommandline ssh utility to connect to the Windows
servers. I guess this is not really a Perl issue but maybe it's something to
do with the module? Any ideas?

Thanks
Ian


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting home directory for OpenSSH logins Truth Monopoly Computer Support 3 11-17-2010 08:14 PM
OpenSSH on Windows Syntax question. perr Computer Security 1 01-18-2008 02:58 PM
OpenSSH Windows Security Erik Naslund Computer Security 13 11-26-2007 02:10 PM
SFTP via SSHWindows/OpenSSH qustion. vbMark Computer Support 1 03-06-2006 06:48 PM
Openssh 4.2 out David Computer Security 1 09-05-2005 07:36 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57