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
How To Create a Linux Swap File
Viewed 2469 times since Fri, Jun 8, 2018
chrt command: Set / Manipulate Real Time Attributes of a Linux Process
Viewed 11058 times since Mon, Feb 17, 2020
Odpalenie polecenia tylko na jedną godzinę
Viewed 2851 times since Thu, May 24, 2018
Zabijanie wszystkich procesów użytkownika
Viewed 2707 times since Thu, May 24, 2018
Install Security Patches or Updates Automatically on CentOS and RHEL
Viewed 1796 times since Fri, Oct 26, 2018
How To Use Systemctl to Manage Systemd Services and Units
Viewed 7506 times since Mon, Dec 7, 2020
RHEL: Reserved space on a ext2/ext3/ext4 filesystem
Viewed 4495 times since Sun, May 27, 2018
An easier way to manage disk decryption at boot with Red Hat Enterprise Linux 7.5 using NBDE
Viewed 7577 times since Mon, Aug 6, 2018
YUM CRON RHEL7: Configure automatic updates.
Viewed 1988 times since Fri, Oct 26, 2018
Expand or grow a file system on a Linux VMWare VM without downtime
Viewed 11677 times since Fri, Jul 27, 2018