Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Net::SFTP mess

by steves (Curate)
on Nov 09, 2004 at 02:42 UTC ( #406269=note: print w/ replies, xml ) Need Help??


in reply to Net::SFTP mess

And for yet another way: If you have Net::SSH::Perl installed, you can also use a remote command like cat (on a *nix system) to move files back and forth, since Net::SSH::Perl's cmd method lets you both capture standard output from the remote command and supply a buffer to use as standard input fed to the remote command.

# $data contains data from a local file to put in the # remote file named by $to ($output, $error, $status) = $ssh->cmd("cat > $to", $data); # On return, $output contains data from the remote file # identified by $from (check status, etc. of course!) ($output, $error, $status) = $ssh->cmd("cat $from");


Comment on Re: Net::SFTP mess
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2015-07-05 09:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (61 votes), past polls