Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

SFTP on Solaris 2.7

by ChipmunkCHeeks (Initiate)
on Jun 30, 2005 at 18:22 UTC ( [id://471496]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

ChipmunkCHeeks has asked for the wisdom of the Perl Monks concerning the following question:

I have updated to the latest version of Net::SFTP 0.09, also updating Net::SSH::Perl to 1.28. This includes any prerequisites needed for succesful builds & test. I configured Net::SSH::Perl with both SSH1 & SSH2 and using Blowfish for encrytion.

When I issue the following commands:
%args = (user => $serverId, password => $serverPass); $sftp = Net::SFTP->new($serverName, %args);
with $serverId & $serverPass defined, I get:
Permission denied at /usr/local/lib/perl5/site_perl/5.8.7/Net/SFTP.pm +line 62
I can login successfully to sftp via command line.
Any clues would be helpful. Thanks in advance.

Replies are listed 'Best First'.
Re: SFTP on Solaris 2.7
by waswas-fng (Curate) on Jun 30, 2005 at 18:48 UTC
    Check your user and pass, line 62 is where is tries to auth against the server -- and you are getting a permission denied.


    -Waswas
Re: SFTP on Solaris 2.7
by BaldPenguin (Friar) on Jun 30, 2005 at 19:00 UTC
    I know that the SSH protocol defaults to 3des for encryption, if you are using blowfish by default, you may have to set that in the ssh_config. Net::SFTP passes that list into the Net::SSH::Perl sub that makes the connection;
    # UNTESTED my %args = ( 'user' => $serverId, 'password' => $serverPass, 'ssh_args' => { 'cipher' => 'blowfish, }, ); my $stfp = Net::SFTP->new( $serverName, %args );
    Update: ssh_config s/b ssh_args

    You could also set the debug values for better messages;
    my %args = ( 'user' => $serverId, 'password' => $serverPass, 'debug' => 1, ); my $stfp = Net::SFTP->new( $serverName, %args );

    Don
    WHITEPAGES.COM | INC
    _

    Edit by castaway: Closed small tag in signature

Re: SFTP on Solaris 2.7
by salva (Canon) on Jul 01, 2005 at 05:15 UTC
    if you can use public/private pairs of keys instead of user/login for authentication, try Net::SFTP::Foreign. It uses the native ssh binary to stablish the connection to the server instead of Net::SSH::Perl and so it is more robust and doesn't require a bunch of additional modules to work.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://471496]
Approved by GrandFather
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.