SSH: Execute Remote Command or Script – Linux

to ROCK? Start a GUI (graphical) application on a remote Linux workstation over SSH! Read more →

Example

Execute the local script.sh on the remote server:

$ ssh root@192.168.1.1 'bash -s' < script.sh
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
10 Linux DIG Command Examples for DNS Lookup
Viewed 11983 times since Sun, Sep 30, 2018
LVM: Move allocated PE between Physical Volumes
Viewed 4933 times since Sat, Jun 2, 2018
Tilix: Advanced Tiling Terminal Emulator for Power Users
Viewed 7884 times since Thu, Apr 18, 2019
20 Linux YUM (Yellowdog Updater, Modified) Commands for Package Management YUM
Viewed 12111 times since Thu, Oct 25, 2018
Monitoring bezpieczeństwa Linux: integracja auditd + OSSEC cz. I
Viewed 3235 times since Fri, Apr 5, 2019
RHEL: Crash kernel dumps configuration and analysis on RHEL 7
Viewed 8409 times since Sat, Jun 2, 2018
Using stunnel to Encrypt Database Connections
Viewed 6035 times since Fri, Sep 28, 2018
LVM: Rename root VG/LV
Viewed 8582 times since Sat, Jun 2, 2018
Jak ustawić LVM, jak robić snapshoty oraz automatycznie powiększać LV, czyli małe howto
Viewed 5626 times since Sun, May 20, 2018
RHCS6: Debug and test multicast traffic between two hosts
Viewed 7696 times since Sun, Jun 3, 2018