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
RHEL: Extending a vmdk (Virtual Machine disk)
Viewed 3964 times since Sun, May 27, 2018
ZPOOL: Verify/change properties of a zpool
Viewed 1989 times since Sun, Jun 3, 2018
stunnel How To Set Up an SSL Tunnel Using Stunnel on Ubuntu
Viewed 1580 times since Sun, Dec 6, 2020
Understanding logrotate utility part 1
Viewed 1621 times since Fri, Nov 30, 2018
LUKS dm-crypt/Device encryption GUIDE
Viewed 2140 times since Fri, Jul 13, 2018
Managing temporary files with systemd-tmpfiles on Red Hat Enterprise Linux 7
Viewed 9398 times since Sun, Nov 22, 2020
Find All Large Files On A Linux System
Viewed 2035 times since Mon, Oct 29, 2018
www.unixarena.com
Viewed 2306 times since Fri, Jul 27, 2018
Securing /tmp and shm partitions
Viewed 3077 times since Fri, May 15, 2020
HowTo: The Ultimate Logrotate Command Tutorial with 10 Examples
Viewed 4949 times since Fri, Nov 30, 2018