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 cryptsetup Examples for LUKS Key Management (How to Add, Remove, Change, Reset LUKS encryption Key)
Viewed 5343 times since Tue, Jul 31, 2018
red hat 7 tmpfiles service
Viewed 1951 times since Thu, Oct 11, 2018
Linux Health Check Commands
Viewed 3313 times since Fri, Jun 8, 2018
Prosty skaner portów TCP w bash
Viewed 3448 times since Thu, May 24, 2018
How To: Linux Hard Disk Encryption With LUKS [ cryptsetup Command ]
Viewed 7467 times since Fri, Jul 13, 2018
RHCS: Install a two-node basic cluster
Viewed 10192 times since Sun, Jun 3, 2018
KONTO SFTP Z CHROOTEM Z UŻYCIEM OPENSSH-SERVER NA CENTOS/RHEL6
Viewed 1985 times since Fri, Nov 30, 2018
ZPOOL: Verify/change properties of a zpool
Viewed 2218 times since Sun, Jun 3, 2018
RHEL: Crash kernel dumps configuration and analysis on RHEL 5
Viewed 7425 times since Sat, Jun 2, 2018
INSTALACJA MIB SNMP W SYSTEMIE CENTOS/RHEL 6
Viewed 13137 times since Fri, Nov 30, 2018