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
LVM: Reduce SWAP size by shrinking existing Logical Volume
Viewed 6489 times since Sat, Jun 2, 2018
Linux Find Large Files
Viewed 3136 times since Mon, Oct 29, 2018
How to maximise SSD performance with Linux
Viewed 8863 times since Fri, May 15, 2020
RHEL: Create a local RPM repository
Viewed 11489 times since Sun, May 27, 2018
Enabling or disabling a repository using Red Hat Subscription Management
Viewed 11329 times since Mon, Oct 29, 2018
RHEL: How to rebuild and/or patch a RPM package
Viewed 9057 times since Sat, Jun 2, 2018
LVM: Remove a Filesystem / Logical Volume
Viewed 2792 times since Sat, Jun 2, 2018
RHEL: Back-up/Replicate a partition table
Viewed 3737 times since Sun, May 27, 2018
debian Debian/Ubuntu Linux: Find If Installed APT Package Includes a Fix/Patch Via CVE Number
Viewed 9675 times since Sun, Sep 23, 2018
RHEL7: Configure automatic updates.
Viewed 2083 times since Wed, Oct 17, 2018