Connecting to a remote Linux Machine

 
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:

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

drwxr-xr-x. 2 root root 4096 Apr 12 00:05 a_folder

drwxr-xr-x. 2 root root 4096 Apr 12 01:31 b_folder

drwxr-xr-x. 2 root root 4096 Apr 12 01:32 c_folder

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.