Jump to content

Execute commands on a remote Linux machine


Recommended Posts

Guest Challenger.
Posted
If you want to execute any command or script on a remote Linux machine, you can use ssh. Below are a few examples.

The syntax for running a command or script on a remote server is:
ssh [uSER]@[iP] [command or script]

Let us look at how this can be done. Suppose you want to display the directory contents of /root of a remote host, you can run the following command:

[narendra@ubunu]$ ssh 
root@172.16.223.128 ls -l /root
root@172.16.223.128's password:
total 12

drwxr-xr-x. 2 root root 4096 Mar 12 00:05 device_drivers

drwxr-xr-x. 2 root root 4096 Mar 12 01:31 pthreads

drwxr-xr-x. 2 root root 4096 Mar 12 01:32 python

[narendra@ubunu]$
 
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.