Skip Menu |

This queue is for tickets about the Net-SSH CPAN distribution.

Report information
The Basics
Id: 22126
Status: new
Priority: 0/
Queue: Net-SSH

People
Owner: Nobody in particular
Requestors: Matthew.L.Dailey [...] Dartmouth.EDU
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Possible Net::SSH bug
Date: Mon, 16 Oct 2006 10:58:56 -0400
To: bug-Net-SSH [...] rt.cpan.org
From: "Matthew L. Dailey" <Matthew.L.Dailey [...] Dartmouth.EDU>
Good morning. I was writing a script using Net::SSH and the ssh_cmd function, and it seems that there is a problem passing arguments to SSH. For example, if I call ssh_cmd like: ssh_cmd( { user => 'user', host => 'host.foo.com', command => 'uname', args => ['-i /tmp/id_dsa'] } ); the arguments get placed after the actual command in SSH.pm, so they're not used by the ssh command. However, if I switch the order like this: --- SSH.pm.orig 2004-02-12 23:11:27.000000000 -0500 +++ SSH.pm 2006-10-16 10:42:29.000000000 -0400 @@ -107,8 +107,8 @@ my $opt = shift; $host = $opt->{host}; $host = $opt->{user}. '@'. $host if exists $opt->{user}; - @command = ( $opt->{command} ); push @command, @{ $opt->{args} } if exists $opt->{args}; + push @command, ( $opt->{command} ); $stdin_string = $opt->{stdin_string}; } else { ($host, @command) = @_; it works as expected. I'm not sure if this is a bug in Net::SSH, or just with my specific system, but I thought I'd pass it along. Please let me know if you have any questions or need any other information. -Matthew L. Dailey Systems Administrator Thayer School of Engineering Dartmouth College matthew.l.dailey@dartmouth.edu (603) 646-2760 Fax: (603) 646-3856
Download smime.p7s
application/pkcs7-signature 1.8k

Message body not shown because it is not plain text.