Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

how can i use PuTTY under Net::SFTP::Foreign ?

by bulent_sahin (Initiate)
on Mar 05, 2008 at 14:48 UTC ( #672184=perlquestion: print w/ replies, xml ) Need Help??
bulent_sahin has asked for the wisdom of the Perl Monks concerning the following question:

my Dear Perl Friends,
I am trying to write a central backup sw with Perl.
and I would like to use your Net::SFTP::Foreign module in my perl code.
 
I have also use PuTTY for SSH connection to my systems.
 
I wrote my Perl code with Net::SFTP:Foreign, but I got following error line,
 
'ssh' is not recognized as an internal or external command, operable program or batch file.
I think, I have to associate PuTTy or any ssh client with Net::SFTP::Foreign But I don't know... How can I do ?? Could you please help me to make this association ? it is very critical for me... Where I can find a resource about this issue ? Thank you very much for your valuable help... with my Best Regards, bulent_sahin.

Comment on how can i use PuTTY under Net::SFTP::Foreign ?
Download Code
Re: how can i use PuTTY under Net::SFTP::Foreign ?
by moklevat (Priest) on Mar 05, 2008 at 15:24 UTC
    From Net:SFTP::Foreign it looks like you define your external SSH client by ssh_cmd => $sshcmd.

    From the PuTTY Documentation it looks like you invoke putty from the command line by putty.exe [-ssh | -telnet | -rlogin | -raw] [user@]host.

    However, depending on what you are trying to do, you may want to use PuTTY's PSFTP or PSCP clients instead.

Re: how can i use PuTTY under Net::SFTP::Foreign ?
by pc88mxer (Vicar) on Mar 05, 2008 at 15:24 UTC
    I think this is as easy as using the the ssh_cmd parameter:
    my $sftp = new Net::SFTP::Foreign(ssh_cmd => 'C:/path/to/putty.exe', h +ost => ...); ...
Re: how can i use PuTTY under Net::SFTP::Foreign ?
by salva (Monsignor) on Jul 17, 2008 at 13:22 UTC
    from version 1.38, Net::SFTP::Foreign has native support for plink.

    Just ensure that it is on the %PATH and...

    my $sftp = Net::SFTP::Foreign->new($host, $ssh_cmd => 'plink');

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://672184]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (12)
As of 2014-09-18 14:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (116 votes), past polls