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
RHCS6: Create a new Logical Volume / Global Filesystem 2 (GFS2)
Viewed 2860 times since Sun, Jun 3, 2018
Method 2 – Use shell scripts How to install yum cron on a CentOS/RHEL 6.x/7.x
Viewed 4674 times since Tue, Dec 4, 2018
Tropienie pożeracza dysku
Viewed 2698 times since Thu, May 24, 2018
debian Install a newer kernel in Debian 9 (stretch) stable
Viewed 2352 times since Sun, Sep 23, 2018
OCFS2 Cluster File System Setup Guide in Linux
Viewed 8037 times since Sat, Jun 2, 2018
PROCESSOR AND MEMORY INFORMATION
Viewed 6163 times since Sat, Jun 2, 2018
RHCS6: Basic operations on clustered services
Viewed 3173 times since Sun, Jun 3, 2018
HowTo: Find Out Hard Disk Specs / Details on Linux
Viewed 4166 times since Mon, Jan 28, 2019
How to deal with dmesg timestamps
Viewed 4125 times since Wed, Oct 3, 2018
RHEL7: How to get started with Firewalld.
Viewed 12811 times since Wed, May 22, 2019