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
YUM CRON RHEL7: Configure automatic updates.
Viewed 2781 times since Fri, Oct 26, 2018
ZPOOL: Detach a submirror from a mirrored zpool
Viewed 3683 times since Sun, Jun 3, 2018
stunnel basics and pki standards
Viewed 10483 times since Fri, Sep 28, 2018
Using stunnel to Encrypt Database Connections
Viewed 6933 times since Fri, Sep 28, 2018
stunnel: Authentication
Viewed 10042 times since Fri, Sep 28, 2018
RHCS: Install a two-node basic cluster
Viewed 11660 times since Sun, Jun 3, 2018
stunnel bacula
Viewed 3024 times since Fri, Sep 28, 2018
How to remove CTRL-M (^M) characters from a file in Linux
Viewed 3794 times since Thu, Feb 7, 2019
zabbix linux How to solve apache error No space left on device: Cannot create SSLMutex
Viewed 3506 times since Wed, Nov 11, 2020
Increase A VMware Disk Size (VMDK) Formatted As Linux LVM without rebooting
Viewed 17105 times since Wed, May 30, 2018