ssh-sftp-perl-users Mailing List for Net::SSH and Net::SFTP - Perl modules (Page 3)
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: Anthony L. <ant...@ya...> - 2012-02-08 21:49:05
|
Hi, I am wondering if anyone of you could give me a hint. Using Net::SSH::Perl, how do I authenticate myself through my user name and my DSA private key? $host = "my.server.com"; $user = "myusername"; $pk = "private.key"; $port = 22; $sftp = Net::SSH::Perl->new (?????); # What constructor do I use? Any hint? Thank you. If Net::SSH::Perl doesn't support public/private key authentication, what other module can I use? Any minimum working example? |
From: Luís C. V. <lui...@gm...> - 2012-01-03 19:49:42
|
Hello everybody! well, i'm facing a weird problem and have no idea how to solve it. i'm running a perl script to ssh a special device and the following lines shows: Reading configuration data /root/.ssh/config Reading configuration data /etc/ssh_config Allocated local port 1023. Connecting to xxx.com, port 22. Remote protocol version 2.0, remote software version Mocana SSH Net::SSH::Perl Version 1.34, protocol version 2.0. No compat match: Mocana SSH <- What does mean? 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. Connection closed by remote host. at /usr/lib/perl5/vendor_perl/5.8.8/Net/SSH/Perl/Kex/DH1.pm line 41 <- What does mean? What mistake did I ? Does anybody know what is happening? Thanks in advanced. # # The Script to SSH # ! ! #!/usr/bin/perl -w use strict; use Net::SSH::Perl; use Data::Dumper; my $host = shift; my $user = "user"; my $password = "********"; my $cmd = 'show clock'; my $ssh = Net::SSH::Perl->new( $host, debug => 3, protocol => + 2, use_pty => 1 ); $ssh->login(); my ($out, $err, $exit ) = $ssh->cmd($cmd); print "out = $out\nerr = $err\nexit = $exit\n"; ! ! |
From: Eduardo R. A. <er...@gm...> - 2011-12-14 19:43:28
|
Well, permissions are O.K. on the keyfiles (600). Yes, (home) is the redacted path to my home directory. Under .ssh I have a known_hosts2 text file with the list of machines I usually connect and their keys (I believe), this is present in all machines I usually connect to. Also, under .ssh2 I have a hostskeys directory with all .pub files from machines I usually connect to, this is also present on all of them. I also created DSA keys and I'm having the same issue. So everything seems to be O.K. from what you told me and everything I've researched. I'm totally lost about what else I can try... 2011/12/12 Steve Phillips <st...@fo...> > On 13/12/2011 3:20 AM, Eduardo Ramírez Acosta wrote: > >> Looks like it was the Perl installation I was using. I switched to a >> more recent one and now I'm not getting the Data::Buffer error but I'm >> getting this (paths and host redacted): >> >> machine> ./test.pl <http://test.pl> >> >> machine: Reading configuration data (home)/.ssh/config >> machine: Reading configuration data /etc/ssh_config >> machine: Connecting to (host), port 22. >> machine: Remote version string: SSH-2.0-ReflectionForSecureIT_6.1.2.1 >> build 3005 >> >> machine: Remote protocol version 2.0, remote software version >> ReflectionForSecureIT_6.1.2.1 build 3005 >> machine: Net::SSH::Perl Version 1.30, protocol version 2.0. >> .machine: No compat match: ReflectionForSecureIT_6.1.2.1 build 3005 >> machine: Connection established. >> machine: Sent key-exchange init (KEXINIT), wait response. >> machine: Algorithms, c->s: 3des-cbc hmac-sha1 none >> machine: Algorithms, s->c: 3des-cbc hmac-sha1 none >> machine: Entering Diffie-Hellman Group 1 key exchange. >> machine: Sent DH public key, waiting for reply. >> machine: Received host key, type 'ssh-dss'. >> machine: Host '(host)' is known and matches the host key. >> machine: Computing shared secret key. >> machine: Verifying server signature. >> machine: Waiting for NEWKEYS message. >> machine: Enabling incoming encryption/MAC/compression. >> machine: Send NEWKEYS, enable outgoing encryption/MAC/compression. >> machine: Sending request for user-authentication service. >> machine: Service accepted: ssh-userauth. >> machine: Trying empty user-authentication request. >> machine: Authentication methods that can continue: >> publickey,keyboard-interactive. >> machine: Next method to try is publickey. >> machine: Trying pubkey authentication with key file >> '(home)/.ssh2/id_rsa_2048_a' >> machine: Will not query passphrase for '(home)/.ssh2/id_rsa_2048_a' in >> batch mode. >> machine: Loading private key failed. >> Permission denied at ./test.pl <http://test.pl> line 47 >> >> >> Same thing happens with id_rsa_2048_a and id_rsa_2048_a.pub (which one >> is the correct by the way?). The passphrase is null, could this be the >> problem? >> Thanks again, >> Eduardo >> >> > It seems it is trying to load your private key and failing for some > reason. Is there a way to turn on more debugging (I'm no longer using this > module so I forget what options there are available) - also, I'd be > checking the file permissions to ensure that this user can actually read > the file (to eliminate the obvious) > > Also, I assume that (home) is just your deletion of the fully qualified > home directory ? > > And the id_rsa_2048_a is the correct file, the other should go on the > other side of the connection and be called something like (or appended to > if this file already exists) 'authorized_keys' under the remote .ssh (or > .ssh2) directory depending on implementation. You'll possibly need to check > your man page to verify this as it seems you have a different installation > of ssh to the one I'm used to. The public/private thing however is pretty > standard, the 'public' key goes on the remote side (the .pub file) and the > private key is used locally (and should only be readable by the user - so > mode 600) > > HTH, > > -- > Steve. > > -- ɐʇsoɔɐ zǝɹıɯɐɹ opɹɐnpǝ "Mas tú, Jehová, eres escudo alrededor de mí; Mi gloria, y el que levanta mi cabeza." Salmo 3:3 |
From: Steve P. <st...@fo...> - 2011-12-12 23:41:58
|
On 13/12/2011 3:20 AM, Eduardo Ramírez Acosta wrote: > Looks like it was the Perl installation I was using. I switched to a > more recent one and now I'm not getting the Data::Buffer error but I'm > getting this (paths and host redacted): > > machine> ./test.pl <http://test.pl> > machine: Reading configuration data (home)/.ssh/config > machine: Reading configuration data /etc/ssh_config > machine: Connecting to (host), port 22. > machine: Remote version string: SSH-2.0-ReflectionForSecureIT_6.1.2.1 > build 3005 > > machine: Remote protocol version 2.0, remote software version > ReflectionForSecureIT_6.1.2.1 build 3005 > machine: Net::SSH::Perl Version 1.30, protocol version 2.0. > .machine: No compat match: ReflectionForSecureIT_6.1.2.1 build 3005 > machine: Connection established. > machine: Sent key-exchange init (KEXINIT), wait response. > machine: Algorithms, c->s: 3des-cbc hmac-sha1 none > machine: Algorithms, s->c: 3des-cbc hmac-sha1 none > machine: Entering Diffie-Hellman Group 1 key exchange. > machine: Sent DH public key, waiting for reply. > machine: Received host key, type 'ssh-dss'. > machine: Host '(host)' is known and matches the host key. > machine: Computing shared secret key. > machine: Verifying server signature. > machine: Waiting for NEWKEYS message. > machine: Enabling incoming encryption/MAC/compression. > machine: Send NEWKEYS, enable outgoing encryption/MAC/compression. > machine: Sending request for user-authentication service. > machine: Service accepted: ssh-userauth. > machine: Trying empty user-authentication request. > machine: Authentication methods that can continue: > publickey,keyboard-interactive. > machine: Next method to try is publickey. > machine: Trying pubkey authentication with key file > '(home)/.ssh2/id_rsa_2048_a' > machine: Will not query passphrase for '(home)/.ssh2/id_rsa_2048_a' in > batch mode. > machine: Loading private key failed. > Permission denied at ./test.pl <http://test.pl> line 47 > > Same thing happens with id_rsa_2048_a and id_rsa_2048_a.pub (which one > is the correct by the way?). The passphrase is null, could this be the > problem? > Thanks again, > Eduardo > It seems it is trying to load your private key and failing for some reason. Is there a way to turn on more debugging (I'm no longer using this module so I forget what options there are available) - also, I'd be checking the file permissions to ensure that this user can actually read the file (to eliminate the obvious) Also, I assume that (home) is just your deletion of the fully qualified home directory ? And the id_rsa_2048_a is the correct file, the other should go on the other side of the connection and be called something like (or appended to if this file already exists) 'authorized_keys' under the remote .ssh (or .ssh2) directory depending on implementation. You'll possibly need to check your man page to verify this as it seems you have a different installation of ssh to the one I'm used to. The public/private thing however is pretty standard, the 'public' key goes on the remote side (the .pub file) and the private key is used locally (and should only be readable by the user - so mode 600) HTH, -- Steve. |
From: Eduardo R. A. <er...@gm...> - 2011-12-12 16:41:20
|
Well, actually I want no user interaction at all so disabling batch mode will prompt me for a passphrase, fail and then prompt me for a password. I want a completely automated authentication like when I do ssh from an xterm, since all machines have the keys I'm not getting prompted for a passphrase and/or password but when using Net::SSH::Perl I'm only able to login with a password. Thanks, Eduardo 2011/12/12 Salvador Fandino <sfa...@ya...> > > > ------------------------------ > *From:* Eduardo Ramírez Acosta <er...@gm...> > *To:* Steve Phillips <st...@fo...> > *Cc:* ssh...@li... > *Sent:* Monday, December 12, 2011 5:20 PM > *Subject:* Re: [Ssh-sftp-perl-users] Help using Net::SSH::Perl with > automatic authentication > > ... > > machine: Trying pubkey authentication with key file > '(home)/.ssh2/id_rsa_2048_a' > machine: Will not query passphrase for '(home)/.ssh2/id_rsa_2048_a' in > batch mode. > > > > Disable batch mode calling the constructor with... > > interactive => 1 > > > -- ɐʇsoɔɐ zǝɹıɯɐɹ opɹɐnpǝ "Mas tú, Jehová, eres escudo alrededor de mí; Mi gloria, y el que levanta mi cabeza." Salmo 3:3 |
From: Salvador F. <sfa...@ya...> - 2011-12-12 16:33:50
|
>________________________________ > From: Eduardo Ramírez Acosta <er...@gm...> >To: Steve Phillips <st...@fo...> >Cc: ssh...@li... >Sent: Monday, December 12, 2011 5:20 PM >Subject: Re: [Ssh-sftp-perl-users] Help using Net::SSH::Perl with automatic authentication > > >... > >machine: Trying pubkey authentication with key file '(home)/.ssh2/id_rsa_2048_a' >machine: Will not query passphrase for '(home)/.ssh2/id_rsa_2048_a' in batch mode. > Disable batch mode calling the constructor with... interactive => 1 |
From: Eduardo R. A. <er...@gm...> - 2011-12-12 16:21:26
|
Looks like it was the Perl installation I was using. I switched to a more recent one and now I'm not getting the Data::Buffer error but I'm getting this (paths and host redacted): machine> ./test.pl machine: Reading configuration data (home)/.ssh/config machine: Reading configuration data /etc/ssh_config machine: Connecting to (host), port 22. machine: Remote version string: SSH-2.0-ReflectionForSecureIT_6.1.2.1 build 3005 machine: Remote protocol version 2.0, remote software version ReflectionForSecureIT_6.1.2.1 build 3005 machine: Net::SSH::Perl Version 1.30, protocol version 2.0. .machine: No compat match: ReflectionForSecureIT_6.1.2.1 build 3005 machine: Connection established. machine: Sent key-exchange init (KEXINIT), wait response. machine: Algorithms, c->s: 3des-cbc hmac-sha1 none machine: Algorithms, s->c: 3des-cbc hmac-sha1 none machine: Entering Diffie-Hellman Group 1 key exchange. machine: Sent DH public key, waiting for reply. machine: Received host key, type 'ssh-dss'. machine: Host '(host)' is known and matches the host key. machine: Computing shared secret key. machine: Verifying server signature. machine: Waiting for NEWKEYS message. machine: Enabling incoming encryption/MAC/compression. machine: Send NEWKEYS, enable outgoing encryption/MAC/compression. machine: Sending request for user-authentication service. machine: Service accepted: ssh-userauth. machine: Trying empty user-authentication request. machine: Authentication methods that can continue: publickey,keyboard-interactive. machine: Next method to try is publickey. machine: Trying pubkey authentication with key file '(home)/.ssh2/id_rsa_2048_a' machine: Will not query passphrase for '(home)/.ssh2/id_rsa_2048_a' in batch mode. machine: Loading private key failed. Permission denied at ./test.pl line 47 Same thing happens with id_rsa_2048_a and id_rsa_2048_a.pub (which one is the correct by the way?). The passphrase is null, could this be the problem? Thanks again, Eduardo 2011/12/8 Steve Phillips <st...@fo...> > On 9/12/2011 4:17 a.m., Eduardo Ramírez Acosta wrote: > >> Can't locate Data/Buffer.pm in @INC (...) at (...)/Crypt/DSA/Key/SSH2.pm >> line 71. >> > > I think you'll find that may be part of your problem. It appears to be > trying to load the SSH2 module and failing with that error. > > Do you have all the necessary dependencies installed ? > > -- > Steve. > -- ɐʇsoɔɐ zǝɹıɯɐɹ opɹɐnpǝ "Mas tú, Jehová, eres escudo alrededor de mí; Mi gloria, y el que levanta mi cabeza." Salmo 3:3 |
From: Steve P. <st...@fo...> - 2011-12-08 23:18:33
|
On 9/12/2011 4:17 a.m., Eduardo Ramírez Acosta wrote: > Can't locate Data/Buffer.pm in @INC (...) at (...)/Crypt/DSA/Key/SSH2.pm > line 71. I think you'll find that may be part of your problem. It appears to be trying to load the SSH2 module and failing with that error. Do you have all the necessary dependencies installed ? -- Steve. |
From: Eduardo R. A. <er...@gm...> - 2011-12-08 17:17:43
|
Hi everyone! I hope this list is still active as I just can't find any help on this. (And this is my first time ever on mailing list!) I'm trying to ssh to a remote machine inside a Perl script with automatic/non-interactive authentication. All machines have keys copied so that when I ssh through an xterm I don't get prompted for a password and I get logged in to the other machine without issues. Now, I want the same using Net::SSH::Perl. My code is as follows: my $ssh = Net::SSH::Perl->new( $host, 'protocol' => 2, 'debug' => 3, 'interactive' => 0, 'identity_files' => ["$ENV{'HOME'}/.ssh2/id_rsa_2048_a"], 'options' => [ "AllowedAuthentications publickey", "QuietMode yes", "StrictHostKeyChecking no", ] ); $ssh->login(); I'm getting at the end of the output (I'm removing Perl's paths for a shorter output) Trying pubkey authentication with key file '(home)/.ssh2/id_rsa_2048_a' Invalid key file type 'SSH2': Can't locate Data/Buffer.pm in @INC (...) at (...)/Crypt/DSA/Key/SSH2.pm line 71. BEGIN failed--compilation aborted at (...)/Crypt/DSA/Key/SSH2.pm line 71. Compilation failed in require at (eval 73) line 1. BEGIN failed--compilation aborted at (eval 73) line 1. at (...)/Net/SSH/Perl/Key/DSA.pm line 64 Under ~/.ssh2 I got id_rsa_2048_a and id_rsa_2048_a.pub, When I try the .pub version I get "Loading private key failed" so I'm guessing Net::SSH::Perl needs the private key to sign the answer to the challenge the server sends (I'm not too skilled with ssh authentication so I may be totally wrong). I also noticed I don't have configuration files under /etc/ssh/ssh or ~/.ssh but under /etc/ssh/ssh2 and ~/.ssh2 and I noticed on the output it's trying to read the ssh versions but not the ssh2 versions, maybe the problem is around there. Anyway, am I missing something here? Am I using the right key? Can someone enlighten me please? Thanks in advance for any help you can provide :) -- ɐʇsoɔɐ zǝɹıɯɐɹ opɹɐnpǝ "Mas tú, Jehová, eres escudo alrededor de mí; Mi gloria, y el que levanta mi cabeza." Salmo 3:3 |
From: Ralph B. <rc...@gm...> - 2011-11-23 22:30:43
|
Pradeep, When I re-size the parent window, the size from the parent window does not get passed to ssh shell client. So when I open the window the size of the parent terminal can get changed from 80x25 to 150x50 but the size of ssh->hell stays 80x24. when I ssh in to the box using ssh, the parent window parameters seem to get passed through ssh to the client machine. I can see this using stty size Chip On 11/23/2011 03:49 AM, S Pratap Singh wrote: > Could you please let me know the exact issue? I think I have faced the same > issue and try to attache the screenshot of the shell window .. so that it > will help me .. If its the same case then I will pass my code to you .. but > before that I have to dig into my dir's ...Ahhhhh ... > > > On Tue, Nov 22, 2011 at 10:10 PM, Ralph Blach <rc...@gm...> wrote: > >> I have successfully used Perl ssh->shell to automatically login to a >> remote machine. >> >> What I am having a problem with is that the window size seem to be stuck >> at 80x24 and and the cursor wraps. >> >> On my local machine, I have an xterm running, when I run regular ssh >> resides the windows on the remote machine >> perfectly. >> >> when I use ssh->shell, how to I get window size events to re-size >> correctly? are the any parameters I could pass to shell >> so that the window would re-size correctly. >> >> >> >> Thanks >> >> Chip >> >> >> >> ------------------------------------------------------------------------------ >> All the data continuously generated in your IT infrastructure >> contains a definitive record of customers, application performance, >> security threats, fraudulent activity, and more. Splunk takes this >> data and makes sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-novd2d >> _______________________________________________ >> Ssh-sftp-perl-users mailing list >> Ssh...@li... >> https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users >> > > > |
From: S P. S. <kda...@gm...> - 2011-11-23 08:49:36
|
Could you please let me know the exact issue? I think I have faced the same issue and try to attache the screenshot of the shell window .. so that it will help me .. If its the same case then I will pass my code to you .. but before that I have to dig into my dir's ...Ahhhhh ... On Tue, Nov 22, 2011 at 10:10 PM, Ralph Blach <rc...@gm...> wrote: > I have successfully used Perl ssh->shell to automatically login to a > remote machine. > > What I am having a problem with is that the window size seem to be stuck > at 80x24 and and the cursor wraps. > > On my local machine, I have an xterm running, when I run regular ssh > resides the windows on the remote machine > perfectly. > > when I use ssh->shell, how to I get window size events to re-size > correctly? are the any parameters I could pass to shell > so that the window would re-size correctly. > > > > Thanks > > Chip > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > -- Regards, Pratap Singh |
From: Ralph B. <rc...@gm...> - 2011-11-23 06:10:26
|
I have successfully used Perl ssh->shell to automatically login to a remote machine. What I am having a problem with is that the window size seem to be stuck at 80x24 and and the cursor wraps. On my local machine, I have an xterm running, when I run regular ssh resides the windows on the remote machine perfectly. when I use ssh->shell, how to I get window size events to re-size correctly? are the any parameters I could pass to shell so that the window would re-size correctly. Thanks Chip |
From: Pierce, S. <Sea...@ar...> - 2011-11-08 16:42:15
|
Oops, I forgot to send an update. I don't know the root cause but unsetting SSH_AUTH_SOCK and export SSH_AUTH_SOCK in the script environment solved the problem and engineers are happy again. On to the next problem. -Sean -----Original Message----- From: Pierce, Sean Sent: Wednesday, November 02, 2011 6:45 PM To: Pierce, Sean; ni...@sy... Cc: ssh...@li... Subject: RE: [Ssh-sftp-perl-users] Net::SSH::Perl --Unequal Access A small break through. The issue is associate with the ssh-agent started on login. Users with early/existing ssh-agent do not have a problem while those with more recent ssh-agent processes have the problem. This is what users see when they login: * keychain 2.7.0 ~ http://www.funtoo.org * Found existing ssh-agent: 7228 * Known ssh key: /export/home/name/.ssh/id_rsa * Known ssh key: /export/home/name/.ssh/id_dsa When the agent is killed the script runs successfully. The system profile provides this line to each user on login: eval `keychain --eval --agents ssh id_rsa id_dsa` Which instantiates these variables: SSH_AUTH_SOCK=/tmp/ssh-ZISL8111/agent.8111; export SSH_AUTH_SOCK; SSH_AGENT_PID=8112; export SSH_AGENT_PID; Nothing --should-- have changed in this area but I need to verify that fully. Either something changed or this is occasionally interfering with Net::SSH::Perl. If something did change (ssh keys, key passwd or permissions) should that effect Net::SSH::Perl module location?? I hope these are unrelated areas. -Sean -----Original Message----- From: Pierce, Sean Sent: Wednesday, November 02, 2011 6:17 PM To: 'ni...@sy...' Cc: ssh...@li... Subject: RE: [Ssh-sftp-perl-users] Net::SSH::Perl --Unequal Access Hi Nigel. That was my first thought but I have not been able to find any differences in the environment. The script is in a shared directory and is executed from the directory or via full path. This system is freshly built and the user accounts largely consistent. I have two clean users with the same bash environments (no .profile) in which one successfully executes the script while the other does not. Maddening! -Sean -----Original Message----- From: Nigel Reed [mailto:ni...@sy...] Sent: Wednesday, November 02, 2011 5:20 PM To: Pierce, Sean Subject: Re: [Ssh-sftp-perl-users] Net::SSH::Perl --Unequal Access How are you invoking your script? From what I read on that link, it looks like the FindBin module might be causing your issues. Are you able to copy the .profile .bashrc .bash_profile and any other startup files to one of the affected users and see if that resolves the problem? If so you know it's something in the environment. Pierce, Sean wrote: > Odd one here. > For a shared Perl tool some users can execute while others cannot. The > error is in finding Net_SSH_PERL modules. Users have the same environment, > permissions perl version and modules. This system is unusual in that > users share SSH keys to provide uniform access to a large range of test > systems. > Here's the error: > Key class 'Net::SSH::Perl::Key::RSA' is unsupported: Base class package > "Class::Loader" is empty. > (Perhaps you need to 'use' the module which defines that package > first, > or make that module available in @INC (@INC contains: > /export/builds/saa_sqa/tools/scaler/../../lib > /opt/csw/lib/perl/site_perl /opt/csw/share/perl/site_perl > /opt/csw/lib/perl/csw /opt/csw/share/perl/csw /opt/csw/lib/perl/5.10.1 > /opt/csw/share/perl/5.10.1 .). > at /opt/csw/share/perl/site_perl/Crypt/RSA.pm line 16 > BEGIN failed--compilation aborted at > /opt/csw/share/perl/site_perl/Crypt/RSA.pm line 16. > Compilation failed in require at > /opt/csw/share/perl/site_perl/Net/SSH/Perl/Key/RSA.pm line 14. > BEGIN failed--compilation aborted at > /opt/csw/share/perl/site_perl/Net/SSH/Perl/Key/RSA.pm line 14. > Compilation failed in require at (eval 164) line 1. > BEGIN failed--compilation aborted at (eval 164) line 1. > > So, there is unequal access to the modules on our infrastructure system. > Modules are found and loaded for some users but not others.?!? > > I found reference to a similar problem here: > http://stackoverflow.com/questions/443493/what-can-make-classloader-fail-where-use-and-new-do-not. > I lack the skills to immediately digest the information and don't have a > test system available to debug without affecting users. > > I'm not sure where to begin to debug this one. Any ideas would be > gratefully accepted. > > Thanks > > -Sean > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1_______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > -- Nigel Reed |
From: Aashish K. <kuk...@gm...> - 2011-11-08 09:07:07
|
-- Aashish kukreti Software Engineer HCL Technologies ltd,noida |
From: Pierce, S. <Sea...@ar...> - 2011-11-03 01:45:04
|
A small break through. The issue is associate with the ssh-agent started on login. Users with early/existing ssh-agent do not have a problem while those with more recent ssh-agent processes have the problem. This is what users see when they login: * keychain 2.7.0 ~ http://www.funtoo.org * Found existing ssh-agent: 7228 * Known ssh key: /export/home/name/.ssh/id_rsa * Known ssh key: /export/home/name/.ssh/id_dsa When the agent is killed the script runs successfully. The system profile provides this line to each user on login: eval `keychain --eval --agents ssh id_rsa id_dsa` Which instantiates these variables: SSH_AUTH_SOCK=/tmp/ssh-ZISL8111/agent.8111; export SSH_AUTH_SOCK; SSH_AGENT_PID=8112; export SSH_AGENT_PID; Nothing --should-- have changed in this area but I need to verify that fully. Either something changed or this is occasionally interfering with Net::SSH::Perl. If something did change (ssh keys, key passwd or permissions) should that effect Net::SSH::Perl module location?? I hope these are unrelated areas. -Sean -----Original Message----- From: Pierce, Sean Sent: Wednesday, November 02, 2011 6:17 PM To: 'ni...@sy...' Cc: ssh...@li... Subject: RE: [Ssh-sftp-perl-users] Net::SSH::Perl --Unequal Access Hi Nigel. That was my first thought but I have not been able to find any differences in the environment. The script is in a shared directory and is executed from the directory or via full path. This system is freshly built and the user accounts largely consistent. I have two clean users with the same bash environments (no .profile) in which one successfully executes the script while the other does not. Maddening! -Sean -----Original Message----- From: Nigel Reed [mailto:ni...@sy...] Sent: Wednesday, November 02, 2011 5:20 PM To: Pierce, Sean Subject: Re: [Ssh-sftp-perl-users] Net::SSH::Perl --Unequal Access How are you invoking your script? From what I read on that link, it looks like the FindBin module might be causing your issues. Are you able to copy the .profile .bashrc .bash_profile and any other startup files to one of the affected users and see if that resolves the problem? If so you know it's something in the environment. Pierce, Sean wrote: > Odd one here. > For a shared Perl tool some users can execute while others cannot. The > error is in finding Net_SSH_PERL modules. Users have the same environment, > permissions perl version and modules. This system is unusual in that > users share SSH keys to provide uniform access to a large range of test > systems. > Here's the error: > Key class 'Net::SSH::Perl::Key::RSA' is unsupported: Base class package > "Class::Loader" is empty. > (Perhaps you need to 'use' the module which defines that package > first, > or make that module available in @INC (@INC contains: > /export/builds/saa_sqa/tools/scaler/../../lib > /opt/csw/lib/perl/site_perl /opt/csw/share/perl/site_perl > /opt/csw/lib/perl/csw /opt/csw/share/perl/csw /opt/csw/lib/perl/5.10.1 > /opt/csw/share/perl/5.10.1 .). > at /opt/csw/share/perl/site_perl/Crypt/RSA.pm line 16 > BEGIN failed--compilation aborted at > /opt/csw/share/perl/site_perl/Crypt/RSA.pm line 16. > Compilation failed in require at > /opt/csw/share/perl/site_perl/Net/SSH/Perl/Key/RSA.pm line 14. > BEGIN failed--compilation aborted at > /opt/csw/share/perl/site_perl/Net/SSH/Perl/Key/RSA.pm line 14. > Compilation failed in require at (eval 164) line 1. > BEGIN failed--compilation aborted at (eval 164) line 1. > > So, there is unequal access to the modules on our infrastructure system. > Modules are found and loaded for some users but not others.?!? > > I found reference to a similar problem here: > http://stackoverflow.com/questions/443493/what-can-make-classloader-fail-where-use-and-new-do-not. > I lack the skills to immediately digest the information and don't have a > test system available to debug without affecting users. > > I'm not sure where to begin to debug this one. Any ideas would be > gratefully accepted. > > Thanks > > -Sean > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1_______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > -- Nigel Reed |
From: Pierce, S. <Sea...@ar...> - 2011-11-03 01:17:26
|
Hi Nigel. That was my first thought but I have not been able to find any differences in the environment. The script is in a shared directory and is executed from the directory or via full path. This system is freshly built and the user accounts largely consistent. I have two clean users with the same bash environments (no .profile) in which one successfully executes the script while the other does not. Maddening! -Sean -----Original Message----- From: Nigel Reed [mailto:ni...@sy...] Sent: Wednesday, November 02, 2011 5:20 PM To: Pierce, Sean Subject: Re: [Ssh-sftp-perl-users] Net::SSH::Perl --Unequal Access How are you invoking your script? From what I read on that link, it looks like the FindBin module might be causing your issues. Are you able to copy the .profile .bashrc .bash_profile and any other startup files to one of the affected users and see if that resolves the problem? If so you know it's something in the environment. Pierce, Sean wrote: > Odd one here. > For a shared Perl tool some users can execute while others cannot. The > error is in finding Net_SSH_PERL modules. Users have the same environment, > permissions perl version and modules. This system is unusual in that > users share SSH keys to provide uniform access to a large range of test > systems. > Here's the error: > Key class 'Net::SSH::Perl::Key::RSA' is unsupported: Base class package > "Class::Loader" is empty. > (Perhaps you need to 'use' the module which defines that package > first, > or make that module available in @INC (@INC contains: > /export/builds/saa_sqa/tools/scaler/../../lib > /opt/csw/lib/perl/site_perl /opt/csw/share/perl/site_perl > /opt/csw/lib/perl/csw /opt/csw/share/perl/csw /opt/csw/lib/perl/5.10.1 > /opt/csw/share/perl/5.10.1 .). > at /opt/csw/share/perl/site_perl/Crypt/RSA.pm line 16 > BEGIN failed--compilation aborted at > /opt/csw/share/perl/site_perl/Crypt/RSA.pm line 16. > Compilation failed in require at > /opt/csw/share/perl/site_perl/Net/SSH/Perl/Key/RSA.pm line 14. > BEGIN failed--compilation aborted at > /opt/csw/share/perl/site_perl/Net/SSH/Perl/Key/RSA.pm line 14. > Compilation failed in require at (eval 164) line 1. > BEGIN failed--compilation aborted at (eval 164) line 1. > > So, there is unequal access to the modules on our infrastructure system. > Modules are found and loaded for some users but not others.?!? > > I found reference to a similar problem here: > http://stackoverflow.com/questions/443493/what-can-make-classloader-fail-where-use-and-new-do-not. > I lack the skills to immediately digest the information and don't have a > test system available to debug without affecting users. > > I'm not sure where to begin to debug this one. Any ideas would be > gratefully accepted. > > Thanks > > -Sean > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1_______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > -- Nigel Reed |
From: Pierce, S. <Sea...@ar...> - 2011-11-02 23:15:14
|
Odd one here. For a shared Perl tool some users can execute while others cannot. The error is in finding Net_SSH_PERL modules. Users have the same environment, permissions perl version and modules. This system is unusual in that users share SSH keys to provide uniform access to a large range of test systems. Here's the error: Key class 'Net::SSH::Perl::Key::RSA' is unsupported: Base class package "Class::Loader" is empty. (Perhaps you need to 'use' the module which defines that package first, or make that module available in @INC (@INC contains: /export/builds/saa_sqa/tools/scaler/../../lib /opt/csw/lib/perl/site_perl /opt/csw/share/perl/site_perl /opt/csw/lib/perl/csw /opt/csw/share/perl/csw /opt/csw/lib/perl/5.10.1 /opt/csw/share/perl/5.10.1 .). at /opt/csw/share/perl/site_perl/Crypt/RSA.pm line 16 BEGIN failed--compilation aborted at /opt/csw/share/perl/site_perl/Crypt/RSA.pm line 16. Compilation failed in require at /opt/csw/share/perl/site_perl/Net/SSH/Perl/Key/RSA.pm line 14. BEGIN failed--compilation aborted at /opt/csw/share/perl/site_perl/Net/SSH/Perl/Key/RSA.pm line 14. Compilation failed in require at (eval 164) line 1. BEGIN failed--compilation aborted at (eval 164) line 1. So, there is unequal access to the modules on our infrastructure system. Modules are found and loaded for some users but not others.?!? I found reference to a similar problem here: http://stackoverflow.com/questions/443493/what-can-make-classloader-fail-where-use-and-new-do-not. I lack the skills to immediately digest the information and don't have a test system available to debug without affecting users. I'm not sure where to begin to debug this one. Any ideas would be gratefully accepted. Thanks -Sean |
From: xiao x. <if...@ya...> - 2011-11-01 02:00:25
|
Hi, I am trying to use Net::SFTP on the linux to connect to a SFTP server on the Windows. I can establish the connection using command line as: sftp user@windows_host with password prompt. However the following perl scripts can't establish the connection. use strict; use warnings; use Net::SFTP; my $file = 'xyz.txt'; my $host = 'xxx.xxx.xxx.xx'; my $user = 'user'; my $pass = 'pass'; my $destdir = '/dir'; my $sftp = Net::SFTP->new($host,$user,$pass) || die "Can not make connection to: $host\n"; $sftp->put($file,$destdir) || die "can't put files: $!\n"; The error msg is: Permission denied at /usr/local/lib/perl5/site_perl/5.12.2/Net/SFTP.pm line 62. But the same username and password worked fine on the command line. Any help will be greatly appreciated. Thanks much. |
From: Pierce, S. <Sea...@ar...> - 2011-10-27 20:20:55
|
Thank you Michal! This was a key in getting Net::SSH::Perl installed. Pratap, thank you too. I was able to successfully install Net::SSH::Perl using SunStudio 12.2. Building this module was a pain but I enjoy the functionality. -Sean From: VANOLE, MICHAEL J [mailto:mv...@at...] Sent: Thursday, October 27, 2011 6:00 AM To: S Pratap Singh; Pierce, Sean Cc: ssh...@li... Subject: RE: [Ssh-sftp-perl-users] Net::SSH::Perl Install >From the author of Math::Pari -- pari-2.5 is not supported. Use 2.1 or 2.3. I had the same issues. I went to 2.1.7 and did: "perl Makefile.PL machine=none" and had no problems From: S Pratap Singh [mailto:kda...@gm...] Sent: Wednesday, October 26, 2011 11:50 PM To: Pierce, Sean Cc: ssh...@li... Subject: Re: [Ssh-sftp-perl-users] Net::SSH::Perl Install Hi Sean, I am not sure about this error and never worked on Solaris. However I would suggest you to use following command before you run the installation once again PATH=/usr/bin:/sbin:/usr/local/bin LD_LIBARAY_PAT=/lib:/usr/lib:/usr/local/lib then export the path on the current environment or make it permanent in your settings and try again to install it. If that does not help then please try installing pari separately using CPAN utility if solaris does have this feature. CPAN> Math::Pari INSTALL Also I would suggest you to use NET::SSH2 and try again . http://search.cpan.org/~rkitover/Net-SSH2-0.40/lib/Net/SSH2.pm Regards, Pratap :- Step forward and do something rather than doing nothing. :) On Wed, Oct 26, 2011 at 2:15 PM, Pierce, Sean <Sea...@ar...<mailto:Sea...@ar...>> wrote: Hello- I am seeking help installing Net::SSH::Perl. I am stuck in pari-2.5.0. Painful so far but I feel close and could use your advice to complete the installation. Context is: Solaris 10, openCSW perl 5.10 created with SunPro compiler. Net::SSH::Perl compiled fine in SunStudion12.2 till pari-2.5.0. Issue is the following link error: /opt/csw/gcc2/bin/gcc -o "/opt/csw/share/perl/.cpan/build/Math-Pari-2 +.01080605-cubJEW/pari-2.5.0/Osolaris-ix86"/libpari.so.2.5.0 -shared +-O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC -Wl,-G,-h,l +ibpari.so.3 mp.o mpinl.o F2x.o FF.o Flx.o FpE.o FpV.o FpX.o Hensel.o +QX_factor.o Qfb.o RgV.o RgX.o ZV.o ZX.o alglin1.o alglin2.o arith1.o +arith2.o base1.o base2.o base3.o base4.o base5.o bb_group.o bibli1.o +bibli2.o bit.o buch1.o buch2.o buch3.o buch4.o concat.o ellanal.o ell +iptic.o galconj.o gen1.o gen2.o gen3.o hnf_snf.o ifactor1.o lll.o nff +actor.o perm.o polarit1.o polarit2.o polarit3.o prime.o random.o root +pol.o subcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o compat. +o compile.o default.o errmsg.o es.o eval.o hash.o init.o intnum.o mem +bers.o paricfg.o pariinl.o parse.o sumiter.o DedekZeta.o aprcl.o elld +ata.o ellsea.o galois.o galpol.o groupid.o krasner.o kummer.o mpqs.o +part.o stark.o subfield.o thue.o -lc -lm Text relocation remains referenced against symbol offset in file readonly_constants 0x1cc init.o readonly_constants 0x1d0 init.o ld: fatal: relocations remain against allocatable but non-writable sec +tions collect2: ld returned 1 exit status *** Error code 1 dmake: Fatal error: Command failed for target `libpari.so.2.5.0' Same area compiled with gcc2 hits a different error in the same area: /opt/csw/gcc2/bin/gcc -o gp-sta -O3 -Wall -fno-strict-aliasing -fomit +-frame-pointer mp.o mpinl.o F2x.o FF.o Flx.o FpE.o FpV.o FpX.o He +nsel.o QX_factor.o Qfb.o RgV.o RgX.o ZV.o ZX.o alglin1.o alglin2.o ar +ith1.o arith2.o base1.o base2.o base3.o base4.o base5.o bb_group.o bi +bli1.o bibli2.o bit.o buch1.o buch2.o buch3.o buch4.o concat.o ellana +l.o elliptic.o galconj.o gen1.o gen2.o gen3.o hnf_snf.o ifactor1.o ll +l.o nffactor.o perm.o polarit1.o polarit2.o polarit3.o prime.o random +.o rootpol.o subcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o +compat.o compile.o default.o errmsg.o es.o eval.o hash.o init.o intnu +m.o members.o paricfg.o pariinl.o parse.o sumiter.o DedekZeta.o aprcl +.o elldata.o ellsea.o galois.o galpol.o groupid.o krasner.o kummer.o +mpqs.o part.o stark.o subfield.o thue.o gp.o gp_init.o gp_rl.o highlv +l.o whatnow.o plotport.o plotnull.o -Wl,-rpath,"/opt/csw/share/perl/. +cpan/build/Math-Pari-2.01080605-cubJEW/pari-2.5.0"/Ognu-ix86:"/usr/lo +cal/lib":/usr/lib -lm ld: fatal: option -dn and -P are incompatible ld: fatal: Flags processing errors collect2: ld returned 1 exit status [download]<http://www.perlmonks.org/?abspart=1;displaytype=displaycode;node_id=933988;part=2> Any advice would be appreciated. Its been a long time since I played with C Thanks -Sean ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Ssh-sftp-perl-users mailing list Ssh...@li...<mailto:Ssh...@li...> https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users -- Regards, Pratap Singh |
From: VANOLE, M. J <mv...@at...> - 2011-10-27 13:26:55
|
>From the author of Math::Pari -- pari-2.5 is not supported. Use 2.1 or 2.3. I had the same issues. I went to 2.1.7 and did: "perl Makefile.PL machine=none" and had no problems From: S Pratap Singh [mailto:kda...@gm...] Sent: Wednesday, October 26, 2011 11:50 PM To: Pierce, Sean Cc: ssh...@li... Subject: Re: [Ssh-sftp-perl-users] Net::SSH::Perl Install Hi Sean, I am not sure about this error and never worked on Solaris. However I would suggest you to use following command before you run the installation once again PATH=/usr/bin:/sbin:/usr/local/bin LD_LIBARAY_PAT=/lib:/usr/lib:/usr/local/lib then export the path on the current environment or make it permanent in your settings and try again to install it. If that does not help then please try installing pari separately using CPAN utility if solaris does have this feature. CPAN> Math::Pari INSTALL Also I would suggest you to use NET::SSH2 and try again . http://search.cpan.org/~rkitover/Net-SSH2-0.40/lib/Net/SSH2.pm Regards, Pratap :- Step forward and do something rather than doing nothing. :) On Wed, Oct 26, 2011 at 2:15 PM, Pierce, Sean <Sea...@ar...<mailto:Sea...@ar...>> wrote: Hello- I am seeking help installing Net::SSH::Perl. I am stuck in pari-2.5.0. Painful so far but I feel close and could use your advice to complete the installation. Context is: Solaris 10, openCSW perl 5.10 created with SunPro compiler. Net::SSH::Perl compiled fine in SunStudion12.2 till pari-2.5.0. Issue is the following link error: /opt/csw/gcc2/bin/gcc -o "/opt/csw/share/perl/.cpan/build/Math-Pari-2 +.01080605-cubJEW/pari-2.5.0/Osolaris-ix86"/libpari.so.2.5.0 -shared +-O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC -Wl,-G,-h,l +ibpari.so.3 mp.o mpinl.o F2x.o FF.o Flx.o FpE.o FpV.o FpX.o Hensel.o +QX_factor.o Qfb.o RgV.o RgX.o ZV.o ZX.o alglin1.o alglin2.o arith1.o +arith2.o base1.o base2.o base3.o base4.o base5.o bb_group.o bibli1.o +bibli2.o bit.o buch1.o buch2.o buch3.o buch4.o concat.o ellanal.o ell +iptic.o galconj.o gen1.o gen2.o gen3.o hnf_snf.o ifactor1.o lll.o nff +actor.o perm.o polarit1.o polarit2.o polarit3.o prime.o random.o root +pol.o subcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o compat. +o compile.o default.o errmsg.o es.o eval.o hash.o init.o intnum.o mem +bers.o paricfg.o pariinl.o parse.o sumiter.o DedekZeta.o aprcl.o elld +ata.o ellsea.o galois.o galpol.o groupid.o krasner.o kummer.o mpqs.o +part.o stark.o subfield.o thue.o -lc -lm Text relocation remains referenced against symbol offset in file readonly_constants 0x1cc init.o readonly_constants 0x1d0 init.o ld: fatal: relocations remain against allocatable but non-writable sec +tions collect2: ld returned 1 exit status *** Error code 1 dmake: Fatal error: Command failed for target `libpari.so.2.5.0' Same area compiled with gcc2 hits a different error in the same area: /opt/csw/gcc2/bin/gcc -o gp-sta -O3 -Wall -fno-strict-aliasing -fomit +-frame-pointer mp.o mpinl.o F2x.o FF.o Flx.o FpE.o FpV.o FpX.o He +nsel.o QX_factor.o Qfb.o RgV.o RgX.o ZV.o ZX.o alglin1.o alglin2.o ar +ith1.o arith2.o base1.o base2.o base3.o base4.o base5.o bb_group.o bi +bli1.o bibli2.o bit.o buch1.o buch2.o buch3.o buch4.o concat.o ellana +l.o elliptic.o galconj.o gen1.o gen2.o gen3.o hnf_snf.o ifactor1.o ll +l.o nffactor.o perm.o polarit1.o polarit2.o polarit3.o prime.o random +.o rootpol.o subcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o +compat.o compile.o default.o errmsg.o es.o eval.o hash.o init.o intnu +m.o members.o paricfg.o pariinl.o parse.o sumiter.o DedekZeta.o aprcl +.o elldata.o ellsea.o galois.o galpol.o groupid.o krasner.o kummer.o +mpqs.o part.o stark.o subfield.o thue.o gp.o gp_init.o gp_rl.o highlv +l.o whatnow.o plotport.o plotnull.o -Wl,-rpath,"/opt/csw/share/perl/. +cpan/build/Math-Pari-2.01080605-cubJEW/pari-2.5.0"/Ognu-ix86:"/usr/lo +cal/lib":/usr/lib -lm ld: fatal: option -dn and -P are incompatible ld: fatal: Flags processing errors collect2: ld returned 1 exit status [download]<http://www.perlmonks.org/?abspart=1;displaytype=displaycode;node_id=933988;part=2> Any advice would be appreciated. Its been a long time since I played with C Thanks -Sean ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Ssh-sftp-perl-users mailing list Ssh...@li...<mailto:Ssh...@li...> https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users -- Regards, Pratap Singh |
From: S P. S. <kda...@gm...> - 2011-10-27 04:50:10
|
Hi Sean, I am not sure about this error and never worked on Solaris. However I would suggest you to use following command before you run the installation once again PATH=/usr/bin:/sbin:/usr/local/bin LD_LIBARAY_PAT=/lib:/usr/lib:/usr/local/lib then export the path on the current environment or make it permanent in your settings and try again to install it. If that does not help then please try installing pari separately using CPAN utility if solaris does have this feature. CPAN> Math::Pari INSTALL Also I would suggest you to use NET::SSH2 and try again . http://search.cpan.org/~rkitover/Net-SSH2-0.40/lib/Net/SSH2.pm Regards, Pratap :- Step forward and do something rather than doing nothing. :) On Wed, Oct 26, 2011 at 2:15 PM, Pierce, Sean <Sea...@ar...>wrote: > Hello-**** > > ** ** > > I am seeking help installing Net::SSH::Perl. I am stuck in > pari-2.5.0. Painful so far but I feel close and could use your advice to > complete the installation.**** > > Context is: Solaris 10, openCSW perl 5.10 created with SunPro compiler. > Net::SSH::Perl compiled fine in SunStudion12.2 till pari-2.5.0. **** > > Issue is the following link error:**** > > /opt/csw/gcc2/bin/gcc -o "/opt/csw/share/perl/.cpan/build/Math-Pari-2**** > > +.01080605-cubJEW/pari-2.5.0/Osolaris-ix86"/libpari.so.2.5.0 -shared **** > > +-O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC -Wl,-G,-h,l**** > > +ibpari.so.3 mp.o mpinl.o F2x.o FF.o Flx.o FpE.o FpV.o FpX.o Hensel.o **** > > +QX_factor.o Qfb.o RgV.o RgX.o ZV.o ZX.o alglin1.o alglin2.o arith1.o **** > > +arith2.o base1.o base2.o base3.o base4.o base5.o bb_group.o bibli1.o **** > > +bibli2.o bit.o buch1.o buch2.o buch3.o buch4.o concat.o ellanal.o ell**** > > +iptic.o galconj.o gen1.o gen2.o gen3.o hnf_snf.o ifactor1.o lll.o nff**** > > +actor.o perm.o polarit1.o polarit2.o polarit3.o prime.o random.o root**** > > +pol.o subcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o compat.**** > > +o compile.o default.o errmsg.o es.o eval.o hash.o init.o intnum.o mem**** > > +bers.o paricfg.o pariinl.o parse.o sumiter.o DedekZeta.o aprcl.o elld**** > > +ata.o ellsea.o galois.o galpol.o groupid.o krasner.o kummer.o mpqs.o **** > > +part.o stark.o subfield.o thue.o -lc -lm **** > > Text relocation remains referenced**** > > against symbol offset in file**** > > readonly_constants 0x1cc init.o**** > > readonly_constants 0x1d0 init.o**** > > ld: fatal: relocations remain against allocatable but non-writable sec**** > > +tions**** > > collect2: ld returned 1 exit status**** > > *** Error code 1**** > > dmake: Fatal error: Command failed for target `libpari.so.2.5.0'**** > > Same area compiled with gcc2 hits a different error in the same area:**** > > /opt/csw/gcc2/bin/gcc -o gp-sta -O3 -Wall -fno-strict-aliasing -fomit**** > > +-frame-pointer mp.o mpinl.o F2x.o FF.o Flx.o FpE.o FpV.o FpX.o He**** > > +nsel.o QX_factor.o Qfb.o RgV.o RgX.o ZV.o ZX.o alglin1.o alglin2.o ar**** > > +ith1.o arith2.o base1.o base2.o base3.o base4.o base5.o bb_group.o bi**** > > +bli1.o bibli2.o bit.o buch1.o buch2.o buch3.o buch4.o concat.o ellana**** > > +l.o elliptic.o galconj.o gen1.o gen2.o gen3.o hnf_snf.o ifactor1.o ll**** > > +l.o nffactor.o perm.o polarit1.o polarit2.o polarit3.o prime.o random**** > > +.o rootpol.o subcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o **** > > +compat.o compile.o default.o errmsg.o es.o eval.o hash.o init.o intnu**** > > +m.o members.o paricfg.o pariinl.o parse.o sumiter.o DedekZeta.o aprcl**** > > +.o elldata.o ellsea.o galois.o galpol.o groupid.o krasner.o kummer.o **** > > +mpqs.o part.o stark.o subfield.o thue.o gp.o gp_init.o gp_rl.o highlv**** > > +l.o whatnow.o plotport.o plotnull.o -Wl,-rpath,"/opt/csw/share/perl/.**** > > +cpan/build/Math-Pari-2.01080605-cubJEW/pari-2.5.0"/Ognu-ix86:"/usr/lo**** > > +cal/lib":/usr/lib -lm**** > > ld: fatal: option -dn and -P are incompatible**** > > ld: fatal: Flags processing errors**** > > collect2: ld returned 1 exit status**** > > [download] <http://www.perlmonks.org/?abspart=1;displaytype=displaycode;node_id=933988;part=2>**** > > Any advice would be appreciated. Its been a long time since I played with > C**** > > Thanks**** > > -Sean**** > > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > > -- Regards, Pratap Singh |
From: Pierce, S. <Sea...@ar...> - 2011-10-26 21:15:51
|
Hello- I am seeking help installing Net::SSH::Perl. I am stuck in pari-2.5.0. Painful so far but I feel close and could use your advice to complete the installation. Context is: Solaris 10, openCSW perl 5.10 created with SunPro compiler. Net::SSH::Perl compiled fine in SunStudion12.2 till pari-2.5.0. Issue is the following link error: /opt/csw/gcc2/bin/gcc -o "/opt/csw/share/perl/.cpan/build/Math-Pari-2 +.01080605-cubJEW/pari-2.5.0/Osolaris-ix86"/libpari.so.2.5.0 -shared +-O3 -Wall -fno-strict-aliasing -fomit-frame-pointer -fPIC -Wl,-G,-h,l +ibpari.so.3 mp.o mpinl.o F2x.o FF.o Flx.o FpE.o FpV.o FpX.o Hensel.o +QX_factor.o Qfb.o RgV.o RgX.o ZV.o ZX.o alglin1.o alglin2.o arith1.o +arith2.o base1.o base2.o base3.o base4.o base5.o bb_group.o bibli1.o +bibli2.o bit.o buch1.o buch2.o buch3.o buch4.o concat.o ellanal.o ell +iptic.o galconj.o gen1.o gen2.o gen3.o hnf_snf.o ifactor1.o lll.o nff +actor.o perm.o polarit1.o polarit2.o polarit3.o prime.o random.o root +pol.o subcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o compat. +o compile.o default.o errmsg.o es.o eval.o hash.o init.o intnum.o mem +bers.o paricfg.o pariinl.o parse.o sumiter.o DedekZeta.o aprcl.o elld +ata.o ellsea.o galois.o galpol.o groupid.o krasner.o kummer.o mpqs.o +part.o stark.o subfield.o thue.o -lc -lm Text relocation remains referenced against symbol offset in file readonly_constants 0x1cc init.o readonly_constants 0x1d0 init.o ld: fatal: relocations remain against allocatable but non-writable sec +tions collect2: ld returned 1 exit status *** Error code 1 dmake: Fatal error: Command failed for target `libpari.so.2.5.0' Same area compiled with gcc2 hits a different error in the same area: /opt/csw/gcc2/bin/gcc -o gp-sta -O3 -Wall -fno-strict-aliasing -fomit +-frame-pointer mp.o mpinl.o F2x.o FF.o Flx.o FpE.o FpV.o FpX.o He +nsel.o QX_factor.o Qfb.o RgV.o RgX.o ZV.o ZX.o alglin1.o alglin2.o ar +ith1.o arith2.o base1.o base2.o base3.o base4.o base5.o bb_group.o bi +bli1.o bibli2.o bit.o buch1.o buch2.o buch3.o buch4.o concat.o ellana +l.o elliptic.o galconj.o gen1.o gen2.o gen3.o hnf_snf.o ifactor1.o ll +l.o nffactor.o perm.o polarit1.o polarit2.o polarit3.o prime.o random +.o rootpol.o subcyclo.o subgroup.o trans1.o trans2.o trans3.o anal.o +compat.o compile.o default.o errmsg.o es.o eval.o hash.o init.o intnu +m.o members.o paricfg.o pariinl.o parse.o sumiter.o DedekZeta.o aprcl +.o elldata.o ellsea.o galois.o galpol.o groupid.o krasner.o kummer.o +mpqs.o part.o stark.o subfield.o thue.o gp.o gp_init.o gp_rl.o highlv +l.o whatnow.o plotport.o plotnull.o -Wl,-rpath,"/opt/csw/share/perl/. +cpan/build/Math-Pari-2.01080605-cubJEW/pari-2.5.0"/Ognu-ix86:"/usr/lo +cal/lib":/usr/lib -lm ld: fatal: option -dn and -P are incompatible ld: fatal: Flags processing errors collect2: ld returned 1 exit status [download]<http://www.perlmonks.org/?abspart=1;displaytype=displaycode;node_id=933988;part=2> Any advice would be appreciated. Its been a long time since I played with C Thanks -Sean |
From: Kate Y. <ka...@yo...> - 2011-08-29 18:11:29
|
Hey guys, I am finding that apache environment lacks *something* that bash has to make an ssh request. The question is, is there any way to bring that something in, or do I have to run SSH/SFTP requests from shell? I am running an sftp login with username and password using Net:::SFTP. Debug logs are identical from the shell and apache. The only differences are that a) the one from Apache runs an order of magnitude slower (I wonder why?) b) most importantly, it hangs at sftp: Sending SSH2_FXP_INIT I have tried to do all I could to make the environment similar, but without knowing what to look for, didn't hit the solution yet. I am running apache 2.2.3, mod_perl 2.0.4, perl 5.8.8, Net::SFTP 0.10, OpenSSL 0.9.8 . No interesting parameters sent to Net::SFTP constructor, just debug. Here is the full log (from apache and shell, same output! This works correctly within the shell!) Thanks for your help! - Kate dev-atlas.accountservergroup.com: Reading configuration data /var/www/.ssh/config dev-atlas.accountservergroup.com: Reading configuration data /etc/ssh_config dev-atlas.accountservergroup.com: Connecting to fleet.site5.com, port 22. dev-atlas.accountservergroup.com: Remote protocol version 1.99, remote software version OpenSSH_3.9p1 dev-atlas.accountservergroup.com: Net::SSH::Perl Version 1.34, protocol version 2.0. dev-atlas.accountservergroup.com: No compat match: OpenSSH_3.9p1. dev-atlas.accountservergroup.com: Connection established. dev-atlas.accountservergroup.com: Sent key-exchange init (KEXINIT), wait response. dev-atlas.accountservergroup.com: Algorithms, c->s: 3des-cbc hmac-sha1 none dev-atlas.accountservergroup.com: Algorithms, s->c: 3des-cbc hmac-sha1 none dev-atlas.accountservergroup.com: Entering Diffie-Hellman Group 1 key exchange. dev-atlas.accountservergroup.com: Sent DH public key, waiting for reply. dev-atlas.accountservergroup.com: Received host key, type 'ssh-dss'. dev-atlas.accountservergroup.com: Host 'fleet.site5.com' is known and matches the host key. dev-atlas.accountservergroup.com: Computing shared secret key. dev-atlas.accountservergroup.com: Verifying server signature. dev-atlas.accountservergroup.com: Waiting for NEWKEYS message. dev-atlas.accountservergroup.com: Send NEWKEYS. dev-atlas.accountservergroup.com: Enabling encryption/MAC/compression. dev-atlas.accountservergroup.com: Sending request for user-authentication service. dev-atlas.accountservergroup.com: Service accepted: ssh-userauth. dev-atlas.accountservergroup.com: Trying empty user-authentication request. dev-atlas.accountservergroup.com: Authentication methods that can continue: publickey,gssapi-with-mic,password. dev-atlas.accountservergroup.com: Next method to try is publickey. dev-atlas.accountservergroup.com: Next method to try is password. dev-atlas.accountservergroup.com: Trying password authentication. dev-atlas.accountservergroup.com: Login completed, opening dummy shell channel. dev-atlas.accountservergroup.com: channel 0: new [client-session] dev-atlas.accountservergroup.com: Requesting channel_open for channel 0. dev-atlas.accountservergroup.com: channel 0: open confirm rwindow 0 rmax 32768 dev-atlas.accountservergroup.com: channel 1: new [client-session] dev-atlas.accountservergroup.com: Requesting channel_open for channel 1. dev-atlas.accountservergroup.com: Sending subsystem: sftp dev-atlas.accountservergroup.com: Requesting service subsystem on channel 1. dev-atlas.accountservergroup.com: channel 1: open confirm rwindow 0 rmax 32768 dev-atlas.accountservergroup.com: sftp: Sending SSH2_FXP_INIT |
From: Robert H. <rob...@fr...> - 2011-08-24 14:38:00
|
Greeting, Net::FTP has the quit function but not so Net:SFTP. Is there a direct way to close a connection, short of ending the script that opened the connection? Thanks... |
From: Deepti S. <dee...@gm...> - 2011-06-21 17:15:22
|
Hi, I am trying to use below script to pull configuration in spectrum (Network Configuration Manager) but i am not getting any result it shows error timeout line 115. Any help would be appreciated: #!/opt/SPECTRUM/bin/perl -w ############################################################## # # # THIS IS AN EXAMPLE SCRIPT ONLY. # # THIS SCRIPT SHOULD NOT BE RUN IN A PRODUCTION ENVIRONMENT # # # ############################################################## # This script will capture the running configuration of a # Cisco IOS OS SSH device and print it to STDOUT. # # Error Codes: # 0 = Success # 255 = Usage error # 254 = Invalid timeout value # 252 = Connection error # 251 = Login error # 249 = Enable error # 244 = Error retrieving configuration # 253 = Unexpected output # use strict; use warnings; use Net::SSH::Expect; $ENV{'PATH'} = "/usr/bin:". $ENV{'PATH'}; ### Main ### if( $#ARGV != 4 && $#ARGV != 5 ) { print "Usage: capture_running.pl <device IP> <user> <pass> <enable_pass> <login_timeout_in_seconds> <capture_timeout_in_seconds>\n"; print STDERR "Usage: capture_running.pl <deviceIP> <user> <pass> <enable_pass> <login_timeout_in_seconds> <capture_timeout_in_seconds>\n"; exit 255; } elsif( $ARGV[4] < 1 || $ARGV[4] > 600 ) { print "$ARGV[4] is the login timeout and must be an int between 1 and 600 seconds\n"; print STDERR "$ARGV[4] is the login timeout and must be an int between 1 and 600 seconds\n"; exit 254; } elsif( $#ARGV == 5 && ( $ARGV[5] < 1 || $ARGV[5] > 600 ) ) { print "$ARGV[5] is the capture timeout and must be an int between 1 and 600 seconds\n"; print STDERR "$ARGV[5] is the capture timeout and must be an int between 1 and 600 seconds\n"; exit 254; } else { my $capture_timeout = $ARGV[4]; if( $ARGV[5] ) { $capture_timeout = $ARGV[5]; } my $errorCode = 1; my @data; my $errorString = "\nHost $ARGV[0]: \n"; ($errorCode, @data) = GetConfig( $ARGV[0], $ARGV[1], $ARGV[2], $ARGV[3], $ARGV[4], $capture_timeout ); if( $errorCode == 0 ) { # Success. The running configuration # content is in the data variable foreach ( @data ) { print "$_\n" }; # print the configuration to STDOUT exit 0; } else { print STDERR $errorString; if( $errorCode == 253 ) { print STDERR join " ", @data, "\nEnable password may be invalid\n"; } else { print STDERR join " ", @data, "\n"; } exit $errorCode; } } exit 0; sub GetConfig { my $deviceIP=shift; my $user=shift; my $pass=shift; my $epass=shift; my $login_timeout=shift; my $capture_timeout=shift; my @config; my $msg; my $ssh = Net::SSH::Expect->new ( host => $deviceIP, user => $user, password=> $pass, raw_pty => 1, no_terminal => 1, timeout => $login_timeout ); my $login_output; eval { $login_output = $ssh->login(); }; if( $@ ) { $msg = "Login has failed. Output: $login_output"; return( 252, $msg ); } #first try login without username and just password if( $login_output !~ /[\#\>]\s*\z/ ) { $msg = "Login has failed. Didn't see device prompt as expected."; $ssh->close(); return( 252, $msg ); } if( $login_output !~ /\#\s*\z/ ) { my $enable = $ssh->exec( "enable" ); # if we have a password prompt after enable, send the password if( $enable =~ /[Pp]assword:/ ) { my $enablepass = $ssh->exec( $epass ); # did the enable password fail? if( $enablepass !~ /\#\s*\z/ ) { $msg = "Enable password failed."; $ssh->close( ); return( 249, $msg ); } } # we didn't require a password, but did we get the enable prompt? elsif( $enable !~ /\#\s*\z/ ) { $msg = "Enable mode prompt not found."; $ssh->close(); return( 249, $msg ); } } # disable paging # different commands for different devices, if they don't # work then we will get messages about problems later # specifically the "No prompt after 'sh run'" error # errmsg doesn't get set when these error and if we use print # and getlines to read for errors it causes problems with print "sh run" # later. $ssh->exec( "term pager 0" ); $ssh->exec( "term length 0" ); $ssh->send( "sh run" ); $ssh->timeout( $capture_timeout ); $ssh->peek(0); while( my $line = $ssh->read_line() ) { # get configuration content if( $line !~ /sh run|Building configuration|Current configuration|^\s*$/ ) { push @config, $line; } } if( @config <= 0 ) { $msg = "No data retrieved, the capture timeout may be too low."; $ssh->close(); return( 244, $msg ); } if( scalar grep { $_ =~ /^%/ } @config ) { # Ensure show start actually returned the config and not an error message containing '%' return( 253, @config ); } return( 0, @config ); # everything was okay, return the captured data } |