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: Show/Add GFS2/GFS journals
Viewed 768 times since Sun, Jun 3, 2018
8 Vim Tips And Tricks That Will Make You A Pro User
Viewed 488 times since Fri, Apr 19, 2019
Extending Linux LVM partitions - scripts
Viewed 2077 times since Sun, May 20, 2018
Open SSL Encrypt & Decrypt Files With Password Using OpenSSL
Viewed 707 times since Mon, Feb 18, 2019
RHEL: Rebuilding the initial ramdisk image
Viewed 1527 times since Sat, Jun 2, 2018
Tilix: Advanced Tiling Terminal Emulator for Power Users
Viewed 1257 times since Thu, Apr 18, 2019
Top 20 OpenSSH Server Best Security Practices ssh linux aix
Viewed 81 times since Fri, May 15, 2020
RHEL: Reserved space on a ext2/ext3/ext4 filesystem
Viewed 2312 times since Sun, May 27, 2018
RHEL7 slow ssh login
Viewed 779 times since Tue, Aug 6, 2019
How to use yum command on CentOS/RHEL
Viewed 1047 times since Wed, Oct 17, 2018