Run Local Script On Remote System via SSH

Discussion in 'Linux' started by Gabriel9999, May 7, 2020.

Tags:
  1. Gabriel9999

    Gabriel9999 MDL Novice

    Joined:
    Mar 11, 2019
    Messages:
    37
    Likes Received:
    5
    Trophy Points:
    0
    I have a script in my system. I want to run this script on the remote system which has SSH connection.
     
  2. coleoptere2007

    coleoptere2007 MDL Guru

    Joined:
    Apr 8, 2008
    Messages:
    3,182
    Likes Received:
    1,796
    Trophy Points:
    120
    ssh user@remotehost "bash -s" < local_script.sh
     
  3. samueltarcin9999

    samueltarcin9999 MDL Novice

    Joined:
    Mar 11, 2019
    Messages:
    37
    Likes Received:
    10
    Trophy Points:
    0