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
Migrate a Linux System from Red Hat Enterprise to CentOS
Viewed 10476 times since Fri, May 15, 2020
LVM: Reduce an existing Logical Volume / Filesystem
Viewed 3692 times since Sat, Jun 2, 2018
Fix rpmdb: Thread died in Berkeley DB library
Viewed 21261 times since Fri, Feb 14, 2020
Secure Remote Logging to Central Log Server Using RSYSLOG on CentOS 6 / CentOS 7 and stunnel
Viewed 4221 times since Sun, Dec 6, 2020
Jak ustawić LVM, jak robić snapshoty oraz automatycznie powiększać LV, czyli małe howto
Viewed 4802 times since Sun, May 20, 2018
How To Find Largest Top 10 Files and Directories On Linux / UNIX / BSD find
Viewed 4002 times since Mon, Oct 29, 2018
how to list all hard disks in linux from command line
Viewed 3769 times since Mon, Jan 28, 2019
10 Linux DIG Command Examples for DNS Lookup
Viewed 11253 times since Sun, Sep 30, 2018
OEL 7 – How to disable IPv6 on Oracle Linux 7
Viewed 20674 times since Fri, Aug 3, 2018
How To Ping Specific Port Number
Viewed 4535 times since Mon, Jun 1, 2020