Skip Menu |

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

Report information
The Basics
Id: 18937
Status: rejected
Priority: 0/
Queue: Net-SSH-Perl

People
Owner: Nobody in particular
Requestors: stephane_ludwig [...] yahoo.fr
Cc:
AdminCc:

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



Subject: root cannot connect but simple user yes (Port allocation problem)
I'm currently working with the Net::SSH::Perl Perl Modul to help me to send Public Keys on several remote server. My problem is that I cannot use the script with the root user. The connection work with a simple user but with the root user the module try to allocate a local port (1023) and that seems to be the problem: -- Allocated local port 1023. -- Connecting to host, port 22....................and a beautiful Timeout !! I tried to use the privileged=>'false' option but it doesn't work :( What kann I do else ?
From: p-kirsch [...] gmx.de
On Mi. 26. Apr. 2006, 11:48:52, guest wrote: Show quoted text
> user but with the root user the module try to allocate a local port > (1023) and that seems to be the problem:
please have a look at "./lib/Net/SSH/Perl.pm" it is matching to an string line 239 "if ($! =~ /(Address|The socket name is) already in use/i) {" and so if you have e.g. german language settings then it will not run, but if you use a "LANG=" (setting default to English) in your commandprompt then it runs further. e.g. tried with "LANG= ./perl_ssh.pl"
From: p-kirsch [...] gmx.de
Show quoted text
> e.g. tried with "LANG= ./perl_ssh.pl"
for reproducing: perl_ssh.pl : #! /usr/bin/perl use strict; use warnings; use Net::SSH::Perl; my $host = "testbox"; my $user = "root"; my $pass = "xxxxxxx"; my $cmd = "/bin/uname -inr"; my $ssh = Net::SSH::Perl->new($host,debug => 6,interactive => 0, protocol => '2,1',use_pty => 'false'); $ssh->login("root", "xxxxx"); my($stdout, $stderr, $exit) = $ssh->cmd($cmd); print "-- $stdout, $stderr, $exit \n"; g19:/tmp # LANG= ./perl_ssh.pl g19: Reading configuration data /root/.ssh/config g19: Reading configuration data /etc/ssh_config g19: Allocated local port 1020. g19: Connecting to testbox, port 22. g19: Remote version string: SSH-1.99-OpenSSH_4.2 g19: Remote protocol version 1.99, remote software version OpenSSH_4.2 g19: Net::SSH::Perl Version 1.30, protocol version 2.0. g19: No compat match: OpenSSH_4.2. g19: Connection established. g19: Sent key-exchange init (KEXINIT), wait response. g19: Algorithms, c->s: 3des-cbc hmac-sha1 none g19: Algorithms, s->c: 3des-cbc hmac-sha1 none g19: Entering Diffie-Hellman Group 1 key exchange. g19: Sent DH public key, waiting for reply. g19: Received host key, type 'ssh-dss'. g19: Host 'testbox' is known and matches the host key. g19: Computing shared secret key. g19: Verifying server signature. g19: Waiting for NEWKEYS message. g19: Enabling incoming encryption/MAC/compression. g19: Send NEWKEYS, enable outgoing encryption/MAC/compression. g19: Sending request for user-authentication service. g19: Service accepted: ssh-userauth. g19: Trying empty user-authentication request. g19: Authentication methods that can continue: publickey,keyboard-interactive. g19: Next method to try is publickey. Permission denied at ./perl_ssh.pl line 14
It's ok, it was a Firewall problem :/ Sorry On Di. 16. Mai 2006, 12:58:52, guest wrote: Show quoted text
> > e.g. tried with "LANG= ./perl_ssh.pl"
> for reproducing: > perl_ssh.pl : > #! /usr/bin/perl > use strict; > use warnings; > use Net::SSH::Perl; > > my $host = "testbox"; > my $user = "root"; > my $pass = "xxxxxxx"; > my $cmd = "/bin/uname -inr"; > > my $ssh = Net::SSH::Perl->new($host,debug => 6,interactive => 0, > protocol => '2,1',use_pty => 'false'); > $ssh->login("root", "xxxxx"); > > my($stdout, $stderr, $exit) = $ssh->cmd($cmd); > > print "-- $stdout, $stderr, $exit \n"; > > g19:/tmp # LANG= ./perl_ssh.pl > g19: Reading configuration data /root/.ssh/config > g19: Reading configuration data /etc/ssh_config > g19: Allocated local port 1020. > g19: Connecting to testbox, port 22. > g19: Remote version string: SSH-1.99-OpenSSH_4.2 > > g19: Remote protocol version 1.99, remote software version OpenSSH_4.2 > g19: Net::SSH::Perl Version 1.30, protocol version 2.0. > g19: No compat match: OpenSSH_4.2. > g19: Connection established. > g19: Sent key-exchange init (KEXINIT), wait response. > g19: Algorithms, c->s: 3des-cbc hmac-sha1 none > g19: Algorithms, s->c: 3des-cbc hmac-sha1 none > g19: Entering Diffie-Hellman Group 1 key exchange. > g19: Sent DH public key, waiting for reply. > g19: Received host key, type 'ssh-dss'. > g19: Host 'testbox' is known and matches the host key. > g19: Computing shared secret key. > g19: Verifying server signature. > g19: Waiting for NEWKEYS message. > g19: Enabling incoming encryption/MAC/compression. > g19: Send NEWKEYS, enable outgoing encryption/MAC/compression. > g19: Sending request for user-authentication service. > g19: Service accepted: ssh-userauth. > g19: Trying empty user-authentication request. > g19: Authentication methods that can continue: > publickey,keyboard-interactive. > g19: Next method to try is publickey. > Permission denied at ./perl_ssh.pl line 14 >
From: p-kirsch [...] gmx.de
On Mi. 17. Mai 2006, 03:16:32, guest wrote: Show quoted text
> It's ok, it was a Firewall problem :/
whatever, the situations still exists, to which person can we assign this bug?
What situation still exists? I can't add matching strings for every language, but if you have another solution I'm listening. Root is allowed to allocate lower ports; this shouldn't be an issue.