Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Pass local bash script to remote host via SSH

by salva (Canon)
on Jun 25, 2020 at 06:59 UTC ( [id://11118490]=note: print w/replies, xml ) Need Help??


in reply to Re: Pass local bash script to remote host via SSH
in thread Pass local bash script to remote host via SSH

Even shorter...
use Net::OpenSSH; die "Couldn't establish SSH connection: ".$ssh->error if $ssh->error; $ssh->system({stdin_data => <<EOD}, 'bash', '-s') or die "command fail +ed: " . $ssh->error; # ... EOD

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-03-28 08:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found