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
RHEL: Enabling standard ftp/telnet
Viewed 1599 times since Sun, May 27, 2018
RHEL: Create a local RPM repository
Viewed 8769 times since Sun, May 27, 2018
6 easy steps to setup offline two factor authentication in Linux
Viewed 9390 times since Mon, Apr 6, 2020
CONFIGURE OCFS2
Viewed 6402 times since Sat, Jun 2, 2018
ZPOOL: Add a mirror to a concat zpool
Viewed 1704 times since Sun, Jun 3, 2018
ZFS: Verify/change properties of a zfs filesystem
Viewed 1284 times since Sun, Jun 3, 2018
OpenSSL – sprawdzanie czy klucz pasuje do certyfikatu
Viewed 1516 times since Thu, May 24, 2018
zabbix linux How to solve apache error No space left on device: Cannot create SSLMutex
Viewed 357 times since Wed, Nov 11, 2020
Zabijanie wszystkich procesów użytkownika
Viewed 1322 times since Thu, May 24, 2018
RHEL: Crash kernel dumps configuration and analysis on RHEL 6
Viewed 2436 times since Sat, Jun 2, 2018