Hi,
I have a problem using Net::SSH::Perl module.
I have a script that logs to other machines and make various checkouts
from Subversion repositories. The problem is that anonymous checkouts
succeed, but checkouts using svn+ssh fail.
These checkouts are working if I don't use Net::SSH::Perl, but I'm sure
there is a way I can find a solution with this module. Maybe it's just a
missing option.
Here is part of my code:
my $ssh = Net::SSH::Perl->new($host,
protocol => '2,1',
options => ["BatchMode yes",
"ForwardAgent yes",
]
);
$ssh->login($user);
# then, this anonymous checkout works:
cmd($ssh, $host, "svn co svn://scm.gforge.inria.fr/svn/xxxxxxxx");
# but the checkout through svn+ssh fails:
cmd($ssh, $host, "svn co
svn+ssh://toto\@scm.gforge.inria.fr/svn/xxxxxxxxx");
He is what I get :
____________
Connecting to xxxx, port 22.
Remote version string: SSH-1.99-OpenSSH_4.5
Remote protocol version 1.99, remote software version OpenSSH_4.5
Net::SSH::Perl Version 1.30, protocol version 2.0.
No compat match: OpenSSH_4.5.
Connection established.
Sent key-exchange init (KEXINIT), wait response.
Algorithms, c->s: 3des-cbc hmac-sha1 none
Algorithms, s->c: 3des-cbc hmac-sha1 none
Entering Diffie-Hellman Group 1 key exchange.
Sent DH public key, waiting for reply.
Received host key, type 'ssh-dss'.
Host 'pinot' is known and matches the host key.
Computing shared secret key.
Verifying server signature.
Waiting for NEWKEYS message.
Enabling incoming encryption/MAC/compression.
Send NEWKEYS, enable outgoing encryption/MAC/compression.
Sending request for user-authentication service.
Service accepted: ssh-userauth.
Trying empty user-authentication request.
Authentication methods that can continue: publickey.
Next method to try is publickey.
Publickey: testing agent key '/home/toto/.ssh/id_rsa'
Public key is accepted, signing data.
Key fingerprint: a6:b9:f5:5b:d8:91:57:df:dexxxxxxxxxxx
Login completed, opening dummy shell channel.
channel 0: new [client-session]
Requesting channel_open for channel 0.
channel 0: open confirm rwindow 0 rmax 32768
Got channel open confirmation, requesting shell.
Requesting service shell on channel 0.
channel 1: new [client-session]
Requesting channel_open for channel 1.
Entering interactive session.
Sending command: svn co svn+ssh://to...@sc.../svn/xxxxxx
Requesting service exec on channel 1.
channel 1: open confirm rwindow 0 rmax 32768
input_channel_request: rtype exit-status reply 0
channel 1: rcvd eof
channel 1: output open -> drain
channel 1: rcvd close
channel 1: input open -> closed
channel 1: close_read
channel 1: obuf empty
channel 1: output drain -> closed
channel 1: close_write
channel 1: send close
channel 1: full closed
Connection closed by 131.254.xxx
svn: Connection closed unexpectedly
__________
If I don't use Net::SSH::Perl, this works fine:
$cmd = "svn co svn+ssh://toto\@scm.gforge.inria.fr/svn/xxxxx";
$cmd = "ssh -o 'BatchMode yes' $host \"$cmd\"";
open(OUT,"$cmd 2>&1 |") or die "cannot fork - '$cmd': $!";
while(<OUT>) {
print "<$host>\t$_";
}
close(OUT);
But I wish I could use Net::SSH::Perl. does anyone know what's wrong
with my code ? Do I need to use Net::SSH::Perl::Agent ?
Thank you,
/ Isabelle
|