Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Pass local bash script to remote host via SSH

by puterboy (Scribe)
on Jun 24, 2020 at 04:16 UTC ( #11118402=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
     
    #!/bin/bash
    ssh <remotehost> bash -s <<EOF
    <local bash script written here>
    EOF
    
  2. or download this
     #!/usr/bin/perl
    my $output = `ssh <remotehost> bash -s` <<EOF
    <local bash script written here>
    EOF
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2022-01-24 21:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (65 votes). Check out past polls.

    Notices?