ssh-sftp-perl-users Mailing List for Net::SSH and Net::SFTP - Perl modules (Page 28)
Brought to you by:
dbrobins
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(4) |
Feb
(15) |
Mar
(13) |
Apr
(8) |
May
(5) |
Jun
(21) |
Jul
(4) |
Aug
(9) |
Sep
(11) |
Oct
(14) |
Nov
(15) |
Dec
(24) |
| 2005 |
Jan
(10) |
Feb
(20) |
Mar
(16) |
Apr
(10) |
May
(12) |
Jun
(16) |
Jul
(18) |
Aug
(21) |
Sep
(11) |
Oct
(19) |
Nov
(16) |
Dec
(9) |
| 2006 |
Jan
(17) |
Feb
(32) |
Mar
(60) |
Apr
(21) |
May
(24) |
Jun
(1) |
Jul
(6) |
Aug
(18) |
Sep
(4) |
Oct
(9) |
Nov
(31) |
Dec
(10) |
| 2007 |
Jan
(8) |
Feb
(11) |
Mar
(3) |
Apr
(7) |
May
(4) |
Jun
(6) |
Jul
(7) |
Aug
(3) |
Sep
(2) |
Oct
(5) |
Nov
(5) |
Dec
(5) |
| 2008 |
Jan
(12) |
Feb
(5) |
Mar
(7) |
Apr
(4) |
May
(37) |
Jun
(9) |
Jul
(24) |
Aug
(5) |
Sep
(2) |
Oct
(7) |
Nov
(6) |
Dec
(7) |
| 2009 |
Jan
(18) |
Feb
(9) |
Mar
(14) |
Apr
(14) |
May
(1) |
Jun
(14) |
Jul
(4) |
Aug
(6) |
Sep
(4) |
Oct
(12) |
Nov
(4) |
Dec
|
| 2010 |
Jan
|
Feb
(3) |
Mar
|
Apr
(1) |
May
(4) |
Jun
|
Jul
(6) |
Aug
(6) |
Sep
|
Oct
(7) |
Nov
(2) |
Dec
(5) |
| 2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
(8) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
|
Oct
(4) |
Nov
(9) |
Dec
(7) |
| 2012 |
Jan
(1) |
Feb
(19) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
(5) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
|
Nov
(6) |
Dec
|
| 2014 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: john f. <joh...@zn...> - 2005-09-08 00:57:18
|
doesn't work for me either. I gave up and switched to wget and cvs updates. On Tue, 2005-09-06 at 20:39 -0700, ssh-sftp-perl-users- re...@li... wrote: > 2GB Files and NET::SFTP -- John Fisher at Znyx Networks Santa Barbara office |
|
From: <mar...@de...> - 2005-09-06 21:02:54
|
Receiving the following error message when trying to transfer a file over 2 GB in size: Wide character in subroutine entry at /usr/lib/perl5/site_perl/5.8.0/Digest/HMAC.pm line 59 Sample code used to produce this error message: use Net::SFTP; my $username='username'; my $password='password'; my $server='foo.org'; my $sftp = Net::SFTP->new($server, user => $username, password => $password); $sftp->get(/some/source/file ","/some/destination/file"); Any help or suggestions would be appreciated. Thank you, Mark |
|
From: <Kr...@nX...> - 2005-09-03 01:59:19
|
the way i did it was to install the library first, and then math-pari after using the following: wget ftp://megrez.math.u-bordeaux.fr/pub/pari/unix/pari-2.1.6.tgz && tar -xzvf pari-2.1.6.tgz && cd pari-2.1.6 && sh ./Configure && make install && wget http://search.cpan.org/CPAN/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.010603.tar.gz && tar -xzvf Math-Pari-2.010603.tar.gz && cd Math-Pari-2.010603 && perl Makefile.PL && make && make test && make install && cd .. && cd .. && rm -rf pari-2.1.6 && rm -f pari-2.1.6.tgz i hope this helps, Aloha, rv, > I want to use Net::SSH::Perl-module, but aparently you need > to install Math::Pari and the corresponding Pari library. > Since I have no root access on my computer (only sysadmins have, grrrr), > I have to indicate that the installation directory is not /usr/local/ > but a /link/to/my/dir/. Is there a way to do this? (the option > --prefix=... doesn't exist here??). > And how do I indicate where my Pari Library is installed? Do I have to > manually change it in the MakeFile.PL? > Are there people out there that suffered the same problem? > > > Thanx in advanace, > > Regards, > Pieter > > > > Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > --BEGIN GC BLOCK V3.12-- GO d? s-:-- !a C++ L++ P++ UL++ E- W-- N+ o K? w--- M V-- PS+++ Y+ PGP R* !tv b+ G e+++ h y* ------END GC BLOCK------ |
|
From: David R. <dr...@ex...> - 2005-09-02 16:58:00
|
> Hi >=20 > (hope this is the correct mailing list to post this) >=20 > I want to use Net::SSH::Perl-module, but aparently you need > to install Math::Pari and the corresponding Pari library. > Since I have no root access on my computer (only sysadmins have, grrrr), > I have to indicate that the installation directory is not /usr/local/ > but a /link/to/my/dir/. Is there a way to do this? (the option > --prefix=3D... doesn't exist here??). > And how do I indicate where my Pari Library is installed? Do I have to > manually change it in the MakeFile.PL? > Are there people out there that suffered the same problem? Are you having problems installing Math::Pari, or Net::SSH::Perl? If Net::SSH::Perl can't find Math::Pari, then you should be able to fix that by adding the Math::Pari install directory to the PERL5LIB environment variable. If Math::Pari can't find the PARI library, you may have to indeed change its Makefile.PL; this is not the right list to ask about Math::Pari in general, but we'll do our best to help. In general the prerequisites for Net::SSH::Perl can be a pain in the neck to install and I sympathize. D |
|
From: Pieter M. <Pie...@es...> - 2005-09-02 14:57:10
|
Hi (hope this is the correct mailing list to post this) I want to use Net::SSH::Perl-module, but aparently you need to install Math::Pari and the corresponding Pari library. Since I have no root access on my computer (only sysadmins have, grrrr), I have to indicate that the installation directory is not /usr/local/ but a /link/to/my/dir/. Is there a way to do this? (the option --prefix=... doesn't exist here??). And how do I indicate where my Pari Library is installed? Do I have to manually change it in the MakeFile.PL? Are there people out there that suffered the same problem? Thanx in advanace, Regards, Pieter Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm |
|
From: <Fra...@gl...> - 2005-08-29 08:02:27
|
Hello,
I want my perl program to connect to a server using SSH.
I want to connect to remote servers I've never been before.
In fact, the program's aim will be to copy a public key on several =
remote servers. Here is the error raised by perl : Not an ARRAY =
reference at /usr/local/share/perl/5.8.4/Math/BigInt/Calc.pm line 222. =
As far as I am concerned I had lots of difficulties to get the =
Net:SSH:perl lib to compile through the cpan shell.
Here is my code (In this case, I manually copied the pub key on the =
remote server)
$adresse_ip=3D"192.168.100.54";
$user=3D"user";
$pass=3D"xxxx";
$params{debug} =3D 1;
$params{interactive} =3D 0;
$params{protocol} =3D '2,1';
$ssh =3D Net::SSH::Perl->new($adresse_ip,%params,options =3D>["BatchMode =
yes","RhostsRSAAuthentication no"]); $ssh->login($user, $pass); =
($stdout, $stderr, $exit) =3D $ssh->cmd("ls");
print $stdout;
print $stderr;
print $exit;
Here is the debug output :=20
Reading configuration data /home/kudjat/.ssh/config
Reading configuration data /etc/ssh_config
Connecting to 192.168.100.54, port 22.
Remote protocol version 2.0, remote software version OpenSSH_3.7.1p1 =
Net::SSH::Perl Version 1.28, protocol version 2.0. No compat match: =
OpenSSH_3.7.1p1. 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 '192.168.100.54' is known and matches the host =
key. Not an ARRAY reference at =
/usr/local/share/perl/5.8.4/Math/BigInt/Calc.pm line 222.
Many thanks for your help.
Regards,
Fran=E7ois
PS : I am running perl on a Debian 2.4.27-1-386
Perl version is 5.8.4
CPAN version is 1.7601
Net::SSH::Perl Version 1.28, protocol version 2.0.
|
|
From: Ari G. <ar...@su...> - 2005-08-25 21:24:13
|
Big thanks to Vladimir for this one, it sure is less then the few lines of
code I wrote to do the same thing.
Just as an update to this, it's starting to look like this may really be a
systems issue (at least on my side) and not really the Net::SSH:Perl module.
The process which calls the script for me is owned by one user, but that
process is a child process of one that is owned by root. So what it looks
like is that even though the UID is that of one user, the shell is that of
root's. Similar to the difference between doing an:
su - username (where you inherit username's shell) versus
su username (where you don't inherit....)
And so that's seems to be why we need to reset the HOME env var, so that the
proper known_hosts file is accessed.
Regards,
Ari
-----Original Message-----
From: Vladimir Parkhaev [mailto:vla...@ar...]
Sent: Thursday, August 25, 2005 9:55 AM
To: Ari Gurewitz
Cc: ssh...@li...
Subject: Re: [Ssh-sftp-perl-users] Running a Net::SSH::Perl script via a W
eb server
I am too lazy to research why....
Quick solution is:
$ENV{HOME}=(getpwuid $<)[7];
Quoting Ari Gurewitz (ar...@su...):
> That's basically what we've done as well, but since we want to distribute
> this script to multiple servers, and based on different server configs the
> script may be run as different users - so while we can add more code in
the
> script to change the HOME environment variable based on the user that is
> running the script (and maybe then reading /etc/passwd to determine the
> proper home dir) it would be nice to not have to deal with this (or at
least
> to better understand it) - so, if anyone has more insight as to how or why
> this variable is changed, or maybe if there is some other setting that
would
> address this I'd be interested in hearing about it.
>
> Thanks,
> Ari
--
.signature: No such file or directory
|
|
From: Ari G. <ar...@su...> - 2005-08-25 16:30:41
|
That's basically what we've done as well, but since we want to distribute
this script to multiple servers, and based on different server configs the
script may be run as different users - so while we can add more code in the
script to change the HOME environment variable based on the user that is
running the script (and maybe then reading /etc/passwd to determine the
proper home dir) it would be nice to not have to deal with this (or at least
to better understand it) - so, if anyone has more insight as to how or why
this variable is changed, or maybe if there is some other setting that would
address this I'd be interested in hearing about it.
Thanks,
Ari
-----Original Message-----
From: ssh...@li...
[mailto:ssh...@li...] On Behalf Of
Thompson, Mark
Sent: Thursday, August 25, 2005 9:05 AM
To: 'ssh...@li...'
Subject: RE: [Ssh-sftp-perl-users] Running a Net::SSH::Perl script via a W
eb server
Thanks that has made my script work, but why does the Net::SSH::Perl module
not set/use this correctly?
Mark
-----Original Message-----
From: Vladimir Parkhaev [mailto:vla...@ar...]
Sent: 25 August 2005 16:06
To: Thompson, Mark
Subject: Re: [Ssh-sftp-perl-users] Running a Net::SSH::Perl script via a Web
server
Quoting Thompson, Mark (Mar...@uk...):
>
> Does anyone know why this happens?
Try adding
$ENV{HOME} = '/usr/netscape';
on top of your script;
--
.signature: No such file or directory
Find out about The Experian Conference 2005 at
www.experian.co.uk/conference2005
==========================================================================
Information in this e-mail and any attachments are confidential, and may not
be copied or used by anyone other than the addressee, nor disclosed to any
third party without our permission. There is no intention to create any
legally binding contract or other binding commitment through the use of this
electronic communication unless it is issued in accordance with the Experian
Limited standard terms and conditions of purchase or other express written
agreement between Experian Limited and the recipient Experian Limited
(registration number 653331) Registered office: Talbot House, Talbot Street,
Nottingham NG80 1TH
Although Experian has taken reasonable steps to ensure that this
communication and any attachments are free from computer virus, you are
advised to take your own steps to ensure that they are actually virus free.
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Ssh-sftp-perl-users mailing list
Ssh...@li...
https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users
|
|
From: Thompson, M. <Mar...@uk...> - 2005-08-25 16:06:32
|
Thanks that has made my script work, but why does the Net::SSH::Perl module
not set/use this correctly?
Mark
-----Original Message-----
From: Vladimir Parkhaev [mailto:vla...@ar...]
Sent: 25 August 2005 16:06
To: Thompson, Mark
Subject: Re: [Ssh-sftp-perl-users] Running a Net::SSH::Perl script via a Web
server
Quoting Thompson, Mark (Mar...@uk...):
>
> Does anyone know why this happens?
Try adding
$ENV{HOME} = '/usr/netscape';
on top of your script;
--
.signature: No such file or directory
Find out about The Experian Conference 2005 at www.experian.co.uk/conference2005
==========================================================================
Information in this e-mail and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other binding commitment through the use of this electronic communication unless it is issued in accordance with the Experian Limited standard terms and conditions of purchase or other express written agreement between Experian Limited and the recipient Experian Limited (registration number 653331) Registered office: Talbot House, Talbot Street, Nottingham NG80 1TH
Although Experian has taken reasonable steps to ensure that this communication and any attachments are free from computer virus, you are advised to take your own steps to ensure that they are actually virus free.
|
|
From: Ari G. <ar...@su...> - 2005-08-25 15:59:24
|
If it's any consolation I'm seeing pretty much the same thing, not running
from the same web server, however I am still receiving the same related
errors. I've also added a line of code to print the environment variables
of the calling user and HOME is set to / - so I too am wondering what sets
this, all the other environment variables seem to correspond pretty well
with the calling user except this one, which is what seems to be causing the
problem. For testing I've reset the HOME variable from within the script
(though I hope this does not have to be the permanent solution) and would
like to know why/how this variable is being set as it is - or more, why the
users HOME is not set properly or over-written.
Thanks,
Ari
_____
From: ssh...@li...
[mailto:ssh...@li...] On Behalf Of
Thompson, Mark
Sent: Thursday, August 25, 2005 6:39 AM
To: 'ssh...@li...'
Subject: [Ssh-sftp-perl-users] Running a Net::SSH::Perl script via a Web
server
Hi,
I've having a problem running a Net::SSH::Perl script via a Web server. I'm
using iPlanet Web Server 4.1 (don't laugh), but the problem also exists in
Apache 1.3.27. Both servers are on a Solaris 8 box. Here's the script I'm
using:
#!/usr/local/bin/perl
use Net::SSH::Perl;
print "Content-type: text/plain\n\n\n";
$i = `id`;
print "id is $i\n";
$ename = "server1";
$elogin = "root";
print "Connecting\n";
$ssh = Net::SSH::Perl->new($ename, debug => 1,protocol => 2, identity_files
=> ["/usr/netscape/.ssh/id_dsa"], options => ["BatchMode yes", "IdentityFile
/usr/netscape/.ssh/id_dsa"]);
print "Logging in\n";
$ssh->login($elogin)";
$tdir = "/tmp";
($res,$err, $exit) = $ssh->cmd("cd $tdir");
if ($exit gt 0) {
print "cd /tmp failed with:\n\n$err\n";
} else {
print "cd worked\n";
}
($res,$err,$exit) = $ssh->cmd("ls");
if ($exit gt 0) {
print "ls failed with:\n\n$err\n";
} else {
print "ls worked\n";
}
($res,$err, $exit) = $ssh->cmd("pwd");
if ($exit gt 0) {
print "pwd failed with:\n\n$err\n";
} else {
print "pwd worked\n";
}
If I run this script as the user netscape from the command line I get:
Content-type: text/plain
id is uid=100(netscape) gid=101(netscape)
pwd is /usr/netscape/server4.1/docs/bussnet/cgi-bin
Connecting
host-not-web01: Reading configuration data /usr/netscape/.ssh/config
host-not-web01: Reading configuration data /etc/ssh_config
host-not-web01: Connecting to server1, port 22.
host-not-web01: Remote protocol version 2.0, remote software version
OpenSSH_3.4p1
host-not-web01: Net::SSH::Perl Version 1.28, protocol version 2.0.
host-not-web01: No compat match: OpenSSH_3.4p1.
host-not-web01: Connection established.
Logging in
host-not-web01: Sent key-exchange init (KEXINIT), wait response.
host-not-web01: Algorithms, c->s: 3des-cbc hmac-sha1 none
host-not-web01: Algorithms, s->c: 3des-cbc hmac-sha1 none
host-not-web01: Entering Diffie-Hellman Group 1 key exchange.
host-not-web01: Sent DH public key, waiting for reply.
host-not-web01: Received host key, type 'ssh-dss'.
host-not-web01: Host 'server1' is known and matches the host key.
host-not-web01: Computing shared secret key.
host-not-web01: Verifying server signature.
host-not-web01: Waiting for NEWKEYS message.
host-not-web01: Enabling incoming encryption/MAC/compression.
host-not-web01: Send NEWKEYS, enable outgoing encryption/MAC/compression.
host-not-web01: Sending request for user-authentication service.
host-not-web01: Service accepted: ssh-userauth.
host-not-web01: Trying empty user-authentication request.
host-not-web01: Authentication methods that can continue:
publickey,password,keyboard-interactive.
host-not-web01: Next method to try is publickey.
host-not-web01: Trying pubkey authentication with key file
'/usr/netscape/.ssh/id_dsa'
host-not-web01: Login completed, opening dummy shell channel.
host-not-web01: channel 0: new [client-session]
host-not-web01: Requesting channel_open for channel 0.
host-not-web01: channel 0: open confirm rwindow 0 rmax 32768
host-not-web01: Got channel open confirmation, requesting shell.
host-not-web01: Requesting service shell on channel 0.
host-not-web01: channel 1: new [client-session]
host-not-web01: Requesting channel_open for channel 1.
host-not-web01: Entering interactive session.
host-not-web01: Sending command: cd /tmp
host-not-web01: Requesting service exec on channel 1.
host-not-web01: channel 1: open confirm rwindow 0 rmax 32768
host-not-web01: input_channel_request: rtype exit-status reply 0
host-not-web01: channel 1: rcvd eof
host-not-web01: channel 1: output open -> drain
host-not-web01: channel 1: rcvd close
host-not-web01: channel 1: input open -> closed
host-not-web01: channel 1: close_read
host-not-web01: channel 1: obuf empty
host-not-web01: channel 1: output drain -> closed
host-not-web01: channel 1: close_write
host-not-web01: channel 1: send close
host-not-web01: channel 1: full closed
cd worked
host-not-web01: channel 2: new [client-session]
host-not-web01: Requesting channel_open for channel 2.
host-not-web01: Entering interactive session.
host-not-web01: Sending command: ls
host-not-web01: Requesting service exec on channel 2.
host-not-web01: channel 2: open confirm rwindow 0 rmax 32768
host-not-web01: channel 2: rcvd eof
host-not-web01: channel 2: output open -> drain
host-not-web01: input_channel_request: rtype exit-status reply 0
host-not-web01: channel 2: rcvd close
host-not-web01: channel 2: input open -> closed
host-not-web01: channel 2: close_read
host-not-web01: channel 2: obuf empty
host-not-web01: channel 2: output drain -> closed
host-not-web01: channel 2: close_write
host-not-web01: channel 2: send close
host-not-web01: channel 2: full closed
ls worked
host-not-web01: channel 3: new [client-session]
host-not-web01: Requesting channel_open for channel 3.
host-not-web01: Entering interactive session.
host-not-web01: Sending command: pwd
host-not-web01: Requesting service exec on channel 3.
host-not-web01: channel 3: open confirm rwindow 0 rmax 32768
host-not-web01: channel 3: rcvd eof
host-not-web01: channel 3: output open -> drain
host-not-web01: input_channel_request: rtype exit-status reply 0
host-not-web01: channel 3: rcvd close
host-not-web01: channel 3: input open -> closed
host-not-web01: channel 3: close_read
host-not-web01: channel 3: obuf empty
host-not-web01: channel 3: output drain -> closed
host-not-web01: channel 3: close_write
host-not-web01: channel 3: send close
host-not-web01: channel 3: full closed
pwd worked
If I run the same script from the web server (by putting it in the cgi-bin
directory), which is running as the netscape user, I get:
host-not-web01: Reading configuration data /.ssh/config
host-not-web01: Reading configuration data /etc/ssh_config
host-not-web01: Connecting to server1, port 22.
host-not-web01: Remote protocol version 2.0, remote software version
OpenSSH_3.4p1
host-not-web01: Net::SSH::Perl Version 1.28, protocol version 2.0.
host-not-web01: No compat match: OpenSSH_3.4p1.
host-not-web01: Connection established.
host-not-web01: Sent key-exchange init (KEXINIT), wait response.
host-not-web01: Algorithms, c->s: 3des-cbc hmac-sha1 none
host-not-web01: Algorithms, s->c: 3des-cbc hmac-sha1 none
host-not-web01: Entering Diffie-Hellman Group 1 key exchange.
host-not-web01: Sent DH public key, waiting for reply.
host-not-web01: Received host key, type 'ssh-dss'.
host-not-web01: Permanently added 'server1' to the list of known hosts.
Can't write to /.ssh/known_hosts2: Permission denied at
/usr/local/lib/perl5/site_perl/5.8.0/Net/SSH/Perl.pm line 380
id is uid=100(netscape) gid=101(netscape)
pwd is /usr/netscape/server4.1/docs/bussnet/cgi-bin
Connecting
Logging in
The problem seems to be that the Net::SSH::Perl thinks it's running as root
and so tries to access the /.ssh/known_hosts2 file.
Does anyone know why this happens?
Regards,
Mark
Find out about The Experian Conference 2005 at
www.experian.co.uk/conference2005
==========================================================================
Information in this e-mail and any attachments are confidential, and may not
be copied or used by anyone other than the addressee, nor disclosed to any
third party without our permission. There is no intention to create any
legally binding contract or other binding commitment through the use of this
electronic communication unless it is issued in accordance with the Experian
Limited standard terms and conditions of purchase or other express written
agreement between Experian Limited and the recipient Experian Limited
(registration number 653331) Registered office: Talbot House, Talbot Street,
Nottingham NG80 1TH
Although Experian has taken reasonable steps to ensure that this
communication and any attachments are free from computer virus, you are
advised to take your own steps to ensure that they are actually virus free.
|
|
From: Thompson, M. <Mar...@uk...> - 2005-08-25 13:41:19
|
Hi,
I've having a problem running a Net::SSH::Perl script via a Web server. I'm
using iPlanet Web Server 4.1 (don't laugh), but the problem also exists in
Apache 1.3.27. Both servers are on a Solaris 8 box. Here's the script I'm
using:
#!/usr/local/bin/perl
use Net::SSH::Perl;
print "Content-type: text/plain\n\n\n";
$i = `id`;
print "id is $i\n";
$ename = "server1";
$elogin = "root";
print "Connecting\n";
$ssh = Net::SSH::Perl->new($ename, debug => 1,protocol => 2, identity_files
=> ["/usr/netscape/.ssh/id_dsa"], options => ["BatchMode yes", "IdentityFile
/usr/netscape/.ssh/id_dsa"]);
print "Logging in\n";
$ssh->login($elogin)";
$tdir = "/tmp";
($res,$err, $exit) = $ssh->cmd("cd $tdir");
if ($exit gt 0) {
print "cd /tmp failed with:\n\n$err\n";
} else {
print "cd worked\n";
}
($res,$err,$exit) = $ssh->cmd("ls");
if ($exit gt 0) {
print "ls failed with:\n\n$err\n";
} else {
print "ls worked\n";
}
($res,$err, $exit) = $ssh->cmd("pwd");
if ($exit gt 0) {
print "pwd failed with:\n\n$err\n";
} else {
print "pwd worked\n";
}
If I run this script as the user netscape from the command line I get:
Content-type: text/plain
id is uid=100(netscape) gid=101(netscape)
pwd is /usr/netscape/server4.1/docs/bussnet/cgi-bin
Connecting
host-not-web01: Reading configuration data /usr/netscape/.ssh/config
host-not-web01: Reading configuration data /etc/ssh_config
host-not-web01: Connecting to server1, port 22.
host-not-web01: Remote protocol version 2.0, remote software version
OpenSSH_3.4p1
host-not-web01: Net::SSH::Perl Version 1.28, protocol version 2.0.
host-not-web01: No compat match: OpenSSH_3.4p1.
host-not-web01: Connection established.
Logging in
host-not-web01: Sent key-exchange init (KEXINIT), wait response.
host-not-web01: Algorithms, c->s: 3des-cbc hmac-sha1 none
host-not-web01: Algorithms, s->c: 3des-cbc hmac-sha1 none
host-not-web01: Entering Diffie-Hellman Group 1 key exchange.
host-not-web01: Sent DH public key, waiting for reply.
host-not-web01: Received host key, type 'ssh-dss'.
host-not-web01: Host 'server1' is known and matches the host key.
host-not-web01: Computing shared secret key.
host-not-web01: Verifying server signature.
host-not-web01: Waiting for NEWKEYS message.
host-not-web01: Enabling incoming encryption/MAC/compression.
host-not-web01: Send NEWKEYS, enable outgoing encryption/MAC/compression.
host-not-web01: Sending request for user-authentication service.
host-not-web01: Service accepted: ssh-userauth.
host-not-web01: Trying empty user-authentication request.
host-not-web01: Authentication methods that can continue:
publickey,password,keyboard-interactive.
host-not-web01: Next method to try is publickey.
host-not-web01: Trying pubkey authentication with key file
'/usr/netscape/.ssh/id_dsa'
host-not-web01: Login completed, opening dummy shell channel.
host-not-web01: channel 0: new [client-session]
host-not-web01: Requesting channel_open for channel 0.
host-not-web01: channel 0: open confirm rwindow 0 rmax 32768
host-not-web01: Got channel open confirmation, requesting shell.
host-not-web01: Requesting service shell on channel 0.
host-not-web01: channel 1: new [client-session]
host-not-web01: Requesting channel_open for channel 1.
host-not-web01: Entering interactive session.
host-not-web01: Sending command: cd /tmp
host-not-web01: Requesting service exec on channel 1.
host-not-web01: channel 1: open confirm rwindow 0 rmax 32768
host-not-web01: input_channel_request: rtype exit-status reply 0
host-not-web01: channel 1: rcvd eof
host-not-web01: channel 1: output open -> drain
host-not-web01: channel 1: rcvd close
host-not-web01: channel 1: input open -> closed
host-not-web01: channel 1: close_read
host-not-web01: channel 1: obuf empty
host-not-web01: channel 1: output drain -> closed
host-not-web01: channel 1: close_write
host-not-web01: channel 1: send close
host-not-web01: channel 1: full closed
cd worked
host-not-web01: channel 2: new [client-session]
host-not-web01: Requesting channel_open for channel 2.
host-not-web01: Entering interactive session.
host-not-web01: Sending command: ls
host-not-web01: Requesting service exec on channel 2.
host-not-web01: channel 2: open confirm rwindow 0 rmax 32768
host-not-web01: channel 2: rcvd eof
host-not-web01: channel 2: output open -> drain
host-not-web01: input_channel_request: rtype exit-status reply 0
host-not-web01: channel 2: rcvd close
host-not-web01: channel 2: input open -> closed
host-not-web01: channel 2: close_read
host-not-web01: channel 2: obuf empty
host-not-web01: channel 2: output drain -> closed
host-not-web01: channel 2: close_write
host-not-web01: channel 2: send close
host-not-web01: channel 2: full closed
ls worked
host-not-web01: channel 3: new [client-session]
host-not-web01: Requesting channel_open for channel 3.
host-not-web01: Entering interactive session.
host-not-web01: Sending command: pwd
host-not-web01: Requesting service exec on channel 3.
host-not-web01: channel 3: open confirm rwindow 0 rmax 32768
host-not-web01: channel 3: rcvd eof
host-not-web01: channel 3: output open -> drain
host-not-web01: input_channel_request: rtype exit-status reply 0
host-not-web01: channel 3: rcvd close
host-not-web01: channel 3: input open -> closed
host-not-web01: channel 3: close_read
host-not-web01: channel 3: obuf empty
host-not-web01: channel 3: output drain -> closed
host-not-web01: channel 3: close_write
host-not-web01: channel 3: send close
host-not-web01: channel 3: full closed
pwd worked
If I run the same script from the web server (by putting it in the cgi-bin
directory), which is running as the netscape user, I get:
host-not-web01: Reading configuration data /.ssh/config
host-not-web01: Reading configuration data /etc/ssh_config
host-not-web01: Connecting to server1, port 22.
host-not-web01: Remote protocol version 2.0, remote software version
OpenSSH_3.4p1
host-not-web01: Net::SSH::Perl Version 1.28, protocol version 2.0.
host-not-web01: No compat match: OpenSSH_3.4p1.
host-not-web01: Connection established.
host-not-web01: Sent key-exchange init (KEXINIT), wait response.
host-not-web01: Algorithms, c->s: 3des-cbc hmac-sha1 none
host-not-web01: Algorithms, s->c: 3des-cbc hmac-sha1 none
host-not-web01: Entering Diffie-Hellman Group 1 key exchange.
host-not-web01: Sent DH public key, waiting for reply.
host-not-web01: Received host key, type 'ssh-dss'.
host-not-web01: Permanently added 'server1' to the list of known hosts.
Can't write to /.ssh/known_hosts2: Permission denied at
/usr/local/lib/perl5/site_perl/5.8.0/Net/SSH/Perl.pm line 380
id is uid=100(netscape) gid=101(netscape)
pwd is /usr/netscape/server4.1/docs/bussnet/cgi-bin
Connecting
Logging in
The problem seems to be that the Net::SSH::Perl thinks it's running as root
and so tries to access the /.ssh/known_hosts2 file.
Does anyone know why this happens?
Regards,
Mark
Find out about The Experian Conference 2005 at www.experian.co.uk/conference2005
==========================================================================
Information in this e-mail and any attachments are confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other binding commitment through the use of this electronic communication unless it is issued in accordance with the Experian Limited standard terms and conditions of purchase or other express written agreement between Experian Limited and the recipient Experian Limited (registration number 653331) Registered office: Talbot House, Talbot Street, Nottingham NG80 1TH
Although Experian has taken reasonable steps to ensure that this communication and any attachments are free from computer virus, you are advised to take your own steps to ensure that they are actually virus free.
|
|
From: john f. <joh...@zn...> - 2005-08-16 23:20:55
|
Michael I haven't much more to say, except it would be interesting to try: a different target machine set debug = 10 or something and see what it spits out a different source machine, and/or a 32bit Solaris It does work manually from the command line, right? John > > Message: 2 > Date: Tue, 16 Aug 2005 13:40:30 -0600 > From: Michael Coons <mic...@mc...> > Subject: RE: [Ssh-sftp-perl-users] Re: Ssh-sftp-perl-users digest, Vol 1 #121 > To: joh...@zn..., ssh...@li... > > Thanks for the response. > > I tried using just SSH2. > ... > > > > What is happing is that in the DH1.pm module is passes a HARD coded string > to compute a large number to use as a key. > > This number grows too big and eventually overflows divll and always crashes. > > This to me sounds like a bug. > > > > So, I am wondering WHY I am in DH via Kex Via SSH-2 in the first place. > > I am trying to get this to work via RSA which I had installed under Crypt. > > > > Based on tons of research, my new calls looks like this: > > > > my $ssh = Net::SSH::Perl->new($host, > > user => "mcoons", > > debug => true, > -- John Fisher at Znyx Networks Santa Barbara office |
|
From: Michael C. <mic...@mc...> - 2005-08-16 22:15:40
|
Thanks for the 2 responses. 1. I tried just protocol 2 and that is the same issue. In fact protocol SSH-1 gets past this point but problems after that. 2. I verified that I am using 5.8.0 and all the 64-bit modules. Now, I have debugged DEEP down and the problem is in the Crypt:DH module. It seems like a bug. Here is my output again. iptsd001.cmie.dev.ops.us.uu.net: Reading configuration data /var/home/mcoons/.ssh/config iptsd001.cmie.dev.ops.us.uu.net: Reading configuration data /etc/ssh/sshd_config iptsd001.cmie.dev.ops.us.uu.net: Connecting to iptsd020-new.mcilink.com, port 22. iptsd001.cmie.dev.ops.us.uu.net: Remote protocol version 1.99, remote software version OpenSSH_3.4p1 iptsd001.cmie.dev.ops.us.uu.net: Net::SSH::Perl Version 1.23, protocol version 2.0. iptsd001.cmie.dev.ops.us.uu.net: No compat match: OpenSSH_3.4p1. iptsd001.cmie.dev.ops.us.uu.net: Connection established. iptsd001.cmie.dev.ops.us.uu.net: Sent key-exchange init (KEXINIT), wait response. iptsd001.cmie.dev.ops.us.uu.net: Algorithms, c->s: 3des-cbc hmac-sha1 none iptsd001.cmie.dev.ops.us.uu.net: Algorithms, s->c: 3des-cbc hmac-sha1 none PARI: *** Invalid arguments to divll. at /usr/local/lib/perl5/site_perl/5.8.0/Crypt/DH.pm line 29, <GEN0> line 1. What is happing is that in the DH1.pm module is passes a HARD coded string to compute a large number to use as a key. This number grows too big and eventually overflows divll and always crashes. This to me sounds like a bug. So, I am wondering WHY I am in DH via Kex Via SSH-2 in the first place. I am trying to get this to work via RSA which I had installed under Crypt. Based on tons of research, my new calls looks like this: my $ssh = Net::SSH::Perl->new($host, user => "mcoons", debug => true, protocol => "2", sys_config => "/etc/ssh/sshd_config", identity_files => "/var/home/mcoons/.ssh/id_rsa /var/home/mcoons/.ssh/id_rsa.pub" , options => ["RhostsRSAAuthentication yes", "HostbasedAuthentication yes", "PreferredAuthentications publickey,hostbased,password,keyboard-inter active", "EnableSSHKeysign yes"]); $ssh->login("mcoons"); <ERROR in LOGIN> Any ideas why I am not routing to RSA in the login and to DH? Thanks Michael Coons Dedicated Tech. Lead Work 303-305-5124 _____ From: Michael Coons [mailto:mic...@mc...] Sent: Monday, August 15, 2005 3:56 PM To: 'ssh...@li...' Subject: Problem in NET::SSH::Perl Invalid arguments divll Ok, I am trying to get this module to work. I think that I have installed what was needed. Running on Solaris 2.8 with Perl 5.8.0 compiled 64-bit. I am using RSA keys. I point to the pub key in the identity files param. My test program is (Obviously private info <> out ) #!/usr/local/bin/perl my $host = "<hostname>"; my %args; $args{user} = "<user>"; $args{protocol} = "2,1"; #$args{identity_files} = "$ENV{HOME}/.ssh/authorized_keys"; $args{identity_files} = "$ENV{HOME}/.ssh/id_rsa.pub"; $args{sys_config} = "/etc/ssh/sshd_config"; $args{user_config} = "/etc/ssh/ssh_config"; $args{debug} = "true"; use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new($host, %args); $ssh->login("<user>"); my $cmd ="ls -1 <directory>"; my($stdout, $stderr, $exit) = $ssh->cmd($cmd); I get back <src machine>: Reading configuration data /etc/ssh/ssh_config <src machine>:: Reading configuration data /etc/ssh/sshd_config <src machine>:: Connecting to <remote machine>, port 22. <src machine>:: Remote protocol version 1.99, remote software version OpenSSH_3.4p1 <src machine>:: Net::SSH::Perl Version 1.23, protocol version 2.0. <src machine>:: No compat match: OpenSSH_3.4p1. <src machine>:: Connection established. <src machine>:: Sent key-exchange init (KEXINIT), wait response. <src machine>:: Algorithms, c->s: 3des-cbc hmac-sha1 none <src machine>:: Algorithms, s->c: 3des-cbc hmac-sha1 none PARI: *** Invalid arguments to divll. at /usr/local/lib/perl5/site_perl/5.8.0/Crypt/DH.pm line 29, <GEN0> line 1. Any ideas? Michael Coons Dedicated Tech. Lead Work 303-305-5124 |
|
From: Michael C. <mic...@mc...> - 2005-08-16 19:40:44
|
Thanks for the response.
I tried using just SSH2.
My program is having problems in the login call.
At the Key Exchange it looks like is it erring in
DH1.pm
The system code is, this function,
sub _dh_new_group1 {
my $dh = Crypt::DH->new;
$dh->g(2);
$dh->p("0xFFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC7402
0BBEA63B139B2251
4A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7E
C6F44C42E9A637ED6B0B
FF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE65381FFFFFFFFFFFFFF
FF");
_gen_key($dh);
$dh;
}
One of the things that I do not understand is why it is trying to use a key
set in the PM when I already have one.
The dh-p call is the problem. I am not sure why this is happening.
Michael Coons
Dedicated Tech. Lead
Work 303-305-5124
-----Original Message-----
From: ssh...@li...
[mailto:ssh...@li...] On Behalf Of john
fisher
Sent: Tuesday, August 16, 2005 9:59 AM
To: ssh...@li...
Subject: [Ssh-sftp-perl-users] Re: Ssh-sftp-perl-users digest, Vol 1 #121
try using SSH 2 only. (I had to use eval to trap errors.)
BTW the following works on linux, but I set up in my CPAN install to use
SSH2-
my %args = (user => $user,
password => $password ,
debug => 0) ; # set to one for verbose
foreach my $file ( @$list ) {
eval {
my $sftp = Net::SFTP->new($remote, %args) ;
my $storefile = $storefile_path. '/' . $file ;
$sftp->put($file, $storefile) ;# can't use "or die"
here without
filtering the return
};
}
On Mon, 2005-08-15 at 20:39 -0700, ssh-sftp-perl-users-
re...@li... wrote:
>
> Today's Topics:
>
> 1. Problem in NET::SSH::Perl Invalid arguments divll (Michael Coons)
>
> --__--__--
>
>
> $args{protocol} = "2,1";
>
> End of Ssh-sftp-perl-users Digest
--
John Fisher at Znyx Networks
Santa Barbara office
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Ssh-sftp-perl-users mailing list
Ssh...@li...
https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users
|
|
From: john f. <joh...@zn...> - 2005-08-16 15:59:07
|
try using SSH 2 only. (I had to use eval to trap errors.)
BTW the following works on linux, but I set up in my CPAN install to use
SSH2-
my %args = (user => $user,
password => $password ,
debug => 0) ; # set to one for verbose
foreach my $file ( @$list ) {
eval {
my $sftp = Net::SFTP->new($remote, %args) ;
my $storefile = $storefile_path. '/' . $file ;
$sftp->put($file, $storefile) ;# can't use "or die" here without
filtering the return
};
}
On Mon, 2005-08-15 at 20:39 -0700, ssh-sftp-perl-users-
re...@li... wrote:
>
> Today's Topics:
>
> 1. Problem in NET::SSH::Perl Invalid arguments divll (Michael Coons)
>
> --__--__--
>
>
> $args{protocol} = "2,1";
>
> End of Ssh-sftp-perl-users Digest
--
John Fisher at Znyx Networks
Santa Barbara office
|
|
From: Michael C. <mic...@mc...> - 2005-08-15 21:56:03
|
Ok, I am trying to get this module to work. I think that I have installed
what was needed.
Running on Solaris 2.8 with Perl 5.8.0 compiled 64-bit. I am using RSA keys.
I point to the pub key in the identity files param.
My test program is (Obviously private info <> out )
#!/usr/local/bin/perl
my $host = "<hostname>";
my %args;
$args{user} = "<user>";
$args{protocol} = "2,1";
#$args{identity_files} = "$ENV{HOME}/.ssh/authorized_keys";
$args{identity_files} = "$ENV{HOME}/.ssh/id_rsa.pub";
$args{sys_config} = "/etc/ssh/sshd_config";
$args{user_config} = "/etc/ssh/ssh_config";
$args{debug} = "true";
use Net::SSH::Perl;
my $ssh = Net::SSH::Perl->new($host, %args);
$ssh->login("<user>");
my $cmd ="ls -1 <directory>";
my($stdout, $stderr, $exit) = $ssh->cmd($cmd);
I get back
<src machine>: Reading configuration data /etc/ssh/ssh_config
<src machine>:: Reading configuration data /etc/ssh/sshd_config
<src machine>:: Connecting to <remote machine>, port 22.
<src machine>:: Remote protocol version 1.99, remote software version
OpenSSH_3.4p1
<src machine>:: Net::SSH::Perl Version 1.23, protocol version 2.0.
<src machine>:: No compat match: OpenSSH_3.4p1.
<src machine>:: Connection established.
<src machine>:: Sent key-exchange init (KEXINIT), wait response.
<src machine>:: Algorithms, c->s: 3des-cbc hmac-sha1 none
<src machine>:: Algorithms, s->c: 3des-cbc hmac-sha1 none
PARI: *** Invalid arguments to divll. at
/usr/local/lib/perl5/site_perl/5.8.0/Crypt/DH.pm line 29, <GEN0> line 1.
Any ideas?
Michael Coons
Dedicated Tech. Lead
Work 303-305-5124
|
|
From: Larry F. <lf...@go...> - 2005-08-11 20:06:51
|
Hello, I just wanted to let people know that I recently added a feature request fo= r=20 the module. It is to add support for SSH agent forwarding, which is blockin= g=20 me from using the package currently. The request is here: http://rt.cpan.org/NoAuth/Bug.html?id=3D14089 If someone can explain to me in some detail how agent forwarding works in= =20 OpenSSH, and it turns out to be simple enough for me to grasp and implement= ,=20 then I will do so.=20 Thanks, Larry |
|
From: Cali <cit...@in...> - 2005-08-10 18:30:53
|
Does anyone have used catalyst?? i hvae some question about it Thankx |
|
From: john f. <joh...@zn...> - 2005-08-10 16:39:55
|
as a fellow-sufferer - I can't get it to send 1.5 gig files across a slow link. please show code, perl version, platform. I assume it works manually? John On Tue, 2005-08-09 at 20:47 -0700, ssh-sftp-perl-users- re...@li... wrote: > I can't get SFTP or SSH modules to use a login and password ( > authenication). > > Anyone out there done this? > > I just keep getting access denied > > Help. > > Thanks -- John Fisher at Znyx Networks Santa Barbara office |
|
From: <BT...@mb...> - 2005-08-10 14:01:05
|
chomp? What do you mean? To what value? I have my user/pass in variables. Do u have an example? ssh...@li... wrote on 08/10/2005 07:33:03 AM: > Did you do a "chomp"? I had the same problem, and that's what it turned > out to be. > > > -----Original Message----- > From: ssh...@li... > [mailto:ssh...@li...] On Behalf Of > BT...@mb... > Sent: Monday, August 08, 2005 5:30 PM > To: ssh...@li... > Subject: [Ssh-sftp-perl-users] User/password authenication via batch > program - howto? > > I can't get SFTP or SSH modules to use a login and password ( > authenication). > > Anyone out there done this? > > I just keep getting access denied > > Help. > > Thanks > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & > QA > Security * Process Improvement & Measurement * > http://www.sqe.com/bsce5sf > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users |
|
From: Kevin T. O'B. <kto...@mu...> - 2005-08-10 12:30:59
|
Did you do a "chomp"? I had the same problem, and that's what it turned out to be. -----Original Message----- From: ssh...@li... [mailto:ssh...@li...] On Behalf Of BT...@mb... Sent: Monday, August 08, 2005 5:30 PM To: ssh...@li... Subject: [Ssh-sftp-perl-users] User/password authenication via batch program - howto? I can't get SFTP or SSH modules to use a login and password ( authenication). Anyone out there done this? I just keep getting access denied Help. Thanks ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Ssh-sftp-perl-users mailing list Ssh...@li... https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users |
|
From: <BT...@mb...> - 2005-08-10 02:32:44
|
I can't get SFTP or SSH modules to use a login and password ( authenication). Anyone out there done this? I just keep getting access denied Help. Thanks |
|
From: <Mic...@co...> - 2005-08-05 20:44:38
|
The script below is trying to connect to a Cisco router via ssh, and is
giving the error messages that follow.
The same code when aimed at a linux server, changing only the host,
user, password and command works fine.=20
Any suggestions are appreciated.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
use strict;
use Net::SSH::Perl;
use Net::SSH::Perl::Cipher;
my $port =3D "ssh";
my $host =3D"xxx.xx.x.x";
my $user =3D "xxxxxxxxx";
my $pass =3D "xxxxxx";
my $cmd =3D "show version";
my $ssh =3D Net::SSH::Perl->new($host,
port =3D> $port,
cipher =3D> Net::SSH::Perl::Cipher::name(3),
debug =3D> 1);
$ssh->login($user, $pass);
my($out, $err) =3D $ssh->cmd($cmd);
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
root@ivan #./test.pl
Reading configuration data /root/.ssh/config
Reading configuration data /etc/ssh_config
Allocated local port 1023.=20
Connecting to XXX.XXX.XXX port 22
Remote protocol version 2.0, remote software version Cisco-1.25
Net::SSH::Perl Version 1.28, protocol version 2.0.
No compat match: Cisco-1.25.
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-rsa'.
Host '172.20.6.3' 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: password.
Next method to try is password.
Trying password authentication.
Login completed, opening dummy shell channel.
channel 0: new [client-session]
Requesting channel_open for channel 0.
channel 0: open confirm rwindow 1024 rmax 4096
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.
Channel open failure: 1: reason 4:
--------------------------------------------------------
Michael deTreville
Cox Communications Central Florida
Broadband Engineering Manager
352-337-2094
|
|
From: Mark A. <mar...@sh...> - 2005-08-05 14:01:25
|
I think this is a great idea, Dave. SSH2 is nearly ubiquitous as it is
right now, and SSH2 has been the default protocol for a long time.=20
I say go for it.
--Mark
-----Original Message-----
From: ssh...@li...
[mailto:ssh...@li...] On Behalf Of
David Robins
Sent: Thursday, August 04, 2005 11:34 PM
To: ssh...@li...
Subject: [Ssh-sftp-perl-users] Net::SSH2?
Since the SSH2 model is somewhat different from SSH1, especially with
the existence of channels, I'm considering adding a Net::SSH2 module to
the distribution, which will support all those extra features without
having to worry about SSH1 compatibility. This will fix the "I did
cmd('cd foo') and
cmd('ls') and I got a listing of my home directory" type bugs.
Do people think this is a good idea?
Perhaps it should be Net::SSH2::Perl for consistency?
Obviously the same backend code will be used, it will just add a new
interface with more functionality.
--
Dave
Isa. 40:31
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Ssh-sftp-perl-users mailing list
Ssh...@li...
https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users
|
|
From: Steve S. <sap...@gs...> - 2005-08-05 05:26:15
|
David Robins wrote:
> Since the SSH2 model is somewhat different from SSH1, especially with the
> existence of channels, I'm considering adding a Net::SSH2 module to the
> distribution, which will support all those extra features without having to
> worry about SSH1 compatibility. This will fix the "I did cmd('cd foo') and
> cmd('ls') and I got a listing of my home directory" type bugs.
>
> Do people think this is a good idea?
It is nice to have something that supports both. Maybe there
could be separate packages with a master package that selects
which subpackage to use?
--
Steve Sapovits GSI Commerce, Inc. http://www.gsicommerce.com
|