Linux Remote Running script / program

5 Jul

apakah linux bisa menjalankan aplikasi dari computer remote ?
ya, sehingga hasil running script /program langsung dilihat di computer local.
misalnya ingin melihat
1. File system dan disk information : df -h
2. memeriksa running process : service … status

contoh 1 :
[oracle@ppc ~]$ ssh oracle@172.20.141.27 ‘df -h’
The authenticity of host ‘172.20.141.27 (172.20.141.27)’ can’t be established.
RSA key fingerprint is 0b:be:48:69:97:e2:80:23:35:d3:9e:38:f7:4e:a2:35.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘172.20.141.27’ (RSA) to the list of known hosts.
oracle@172.20.141.27’s password:
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1              14G  2.9G   11G  22% /
/dev/hda2              99M   11M   83M  12% /boot
none                  1.7G     0  1.7G   0% /dev/shm
/dev/hda5             440G  278G  140G  67% /u01
/dev/hdb1              74G   18G   53G  25% /u02
/dev/hda6             2.8G  1.8G  862M  68% /usr

contoh 2 :
[oracle@ppc ~]$ ssh oracle@172.20.141.27 ‘top -b -n 1 | head -n 8’
oracle@172.20.141.27’s password:
top – 13:43:41 up 56 days,  2:16,  4 users,  load average: 0.00, 0.00, 0.00
Tasks: 112 total,   2 running, 110 sleeping,   0 stopped,   0 zombie
Cpu(s):  4.9% us,  1.3% sy,  0.0% ni, 90.1% id,  3.7% wa,  0.0% hi,  0.0% si
Mem:   3367232k total,  3343516k used,    23716k free,    84436k buffers
Swap:  2449904k total,    26928k used,  2422976k free,  3035900k cached

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
1 root      16   0  3080  556  476 S  0.0  0.0   0:46.30 init

kalau tidak ingin diminati password lakukan seperti https://setijoagus.wordpress.com/2009/08/10/rsync-tanpa-password/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: