Running Commands on a Remote Linux Server over SSH
In this note you will find the examples of how to execute commands on a remote Linux machine and get the result locally.
This information may be very useful if you are creating some Bash Script that should be ran from the local machine and execute some commands on a remote server.
You'll learn, how to :
- execute a command on a remote Linux Server;
- run multiply commands over SSH;
- execute a local script on a remote Linux server without copying it.
You may also be interested in the following articles :
Running a Command on a Remote Linux Server
Get the uptime of the remote server
Reboot the remote server
Running Multiply Commands over SSH
METHOD 1 :
Get Uptime and Disk Usage
METHOD 2 :
Get Memory Usage and Load Average
METHOD 3 :
Show Kernel Version, CPU(s) info and Total RAM seen by the system
grep "model name" /proc/cpuinfo
grep MemTotal /proc/meminfo