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
Linux – Securing your important files with XFS extendend attributes
Viewed 8070 times since Wed, Jul 25, 2018
chrt command: Set / Manipulate Real Time Attributes of a Linux Process
Viewed 11865 times since Mon, Feb 17, 2020
How To Run Multiple SSH Command On Remote Machine And Exit Safely
Viewed 5161 times since Tue, Aug 6, 2019
CentOS / RHEL : Configure yum automatic updates with yum-cron service
Viewed 4041 times since Fri, Oct 26, 2018
HowTo: Send Email from an SMTP Server using the Command Line
Viewed 2776 times since Mon, Feb 18, 2019
How to run command or code in parallel in bash shell under Linux or Unix
Viewed 3878 times since Tue, Aug 6, 2019
RHEL: Back-up/Replicate a partition table
Viewed 4142 times since Sun, May 27, 2018
How To Use the Linux Auditing System on CentOS 7
Viewed 4618 times since Fri, Apr 5, 2019
RHEL: Crash kernel dumps configuration and analysis on RHEL 7
Viewed 7913 times since Sat, Jun 2, 2018
Using IOzone for Linux disk performance analysis
Viewed 9081 times since Wed, Jul 25, 2018