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: Extend an existing Logical Volume / GFS2 filesystem
Viewed 3341 times since Sun, Jun 3, 2018
10 Linux rsync Examples to Exclude Files/Directories
Viewed 11015 times since Wed, Oct 31, 2018
“Too many authentication failures” with SSH
Viewed 6139 times since Mon, May 21, 2018
RHEL: Forgotten ’root’ password / using single-user to gain access
Viewed 7619 times since Sat, Jun 2, 2018
Testing TLS/SSL encryption
Viewed 13352 times since Thu, Jan 16, 2020
RHEL: Extending a vmdk (Virtual Machine disk)
Viewed 4250 times since Sun, May 27, 2018
Linux - How to get CPU information
Viewed 2302 times since Fri, Jun 8, 2018
12 Tcpdump Commands – A Network Sniffer Tool
Viewed 8856 times since Fri, Jul 27, 2018
LVM: Create a new Logical Volume / Filesystem
Viewed 2153 times since Sat, Jun 2, 2018
Jak znaleźć najszybszy publiczny serwer DNS w Polsce?
Viewed 3176 times since Mon, May 21, 2018