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
Learn Linux System Auditing with Auditd Tool on CentOS/RHEL
Viewed 3309 times since Fri, Apr 5, 2019
How To Ping Specific Port Number
Viewed 2668 times since Mon, Jun 1, 2020
LOGROTATE – ARCHIWIAZACJA LOGÓW
Viewed 1428 times since Fri, Nov 30, 2018
RHCS6: Extend an existing Logical Volume / GFS2 filesystem
Viewed 2441 times since Sun, Jun 3, 2018
Build a simple RPM that packages a single file
Viewed 7351 times since Sat, Jun 2, 2018
RHEL: Resize/disable /dev/shm filesystem
Viewed 11979 times since Sun, May 27, 2018
Understanding logrotate utility part 1
Viewed 1246 times since Fri, Nov 30, 2018
YUM CRON Enabling automatic updates in Centos 7 and RHEL 7
Viewed 11383 times since Fri, Oct 26, 2018
Super Grub2 Disk
Viewed 2275 times since Wed, May 22, 2019
Sample logrotate configuration and troubleshooting part 2
Viewed 8850 times since Fri, Nov 30, 2018