REMOTE SSH DENGAN RSH

2 Sep

Kadangkala kita ingin menjalankan perintah ke komputer linux tanpa perlu login lagi, misalkan

diinginkan agar mesin linux2 dapat menjalankan semua perintah di mesin linux1 dengan user

tertentu. Dengan cara ini pertanyaan password tidak akan ditanyakan lagi, fungsi ini biasanya

digunakan untuk oracle 10g / 11g RAC (clusterring)

1. Periksa packet yang ada di server tujuan
[root@linux1 ~]# rpm -q rsh rsh-server
rsh-0.17-25.3
rsh-server-0.17-25.3
[root@linux1 ~]# touch /etc/hosts.equiv
[root@linux1 ~]# chmod 600 /etc/hosts.equiv
[root@linux1 ~]# chown root.root /etc/hosts.equiv
[root@linux1 ~]# vi /etc/hosts.equiv
+linux1 onta
+linux2 onta

2. Menggunakan rsh  /usr/bin/rsh di server tujuan
[root@linux1 ~]# which rsh
/usr/kerberos/bin/rsh

[root@linux1 ~]# mv /usr/kerberos/bin/rsh /usr/kerberos/bin/rsh.original
[root@linux1 ~]# mv /usr/kerberos/bin/rcp /usr/kerberos/bin/rcp.original
[root@linux1 ~]# mv /usr/kerberos/bin/rlogin /usr/kerberos/bin/rlogin.original

[root@linux1 ~]# which rsh
/usr/bin/rsh

3. Aktifkan service rsh di server tujuan
[root@linux1 ~]# chkconfig rsh on
[root@linux1 ~]# chkconfig rlogin on
[root@linux1 ~]# service xinetd reload
Reloading configuration: [ OK ]

4. Test rsh dari client dalam contoh linux2
[onta@linux2 ~]$ rsh linux1 ls -l /etc/hosts.equiv
-rw——-  1 root root 68 Jan 19 09:00 /etc/hosts.equiv

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: