OSETC TECH

Unix/Linux:How To Configure Remote Shell Acess(RSH)

If the servers you will be used are located in a same LAN env…then you can use rsh, rlogin,rcp or others commands to connect each servers, althought it transfers the password plainly, but security risks are not a problem in this kinds of env(LAN). In this post, you’ll see how to setup remote shell access on linux operating system, and How to configrue rsh so that no password prompt when logging the another server.

Setup Remote Shell Acess(RSH)

Step1: you need to install rsh and rshd packages and issue the following command:

#yum install rsh rsh-server

Step2: Edit “/etc/xinetd.d/rsh” configuraiton file to make sure rshd is enabled by checking the configuration file and find “disable” field. set it to “no“. the final version of configruation shown as below:

socket_type    = stream

wait           = no

user           = root

log_on_success += USERID

log_on_failure += USERID

server         = /usr/sbin/in.rshd

disable        = no

Step3: save and close the above configuraiton file, then Edit the ~.rhosts file and adding the remote hosts name or ipaddress into, then when other remote hosts try to connect this server, it will login directlry without password prompt.

#cat ~.rhost

devops1.osetc.com

devops2.osetc.com

devops3.osetc.com

Step4: Restart the xinetd service, issue the following command:

#/etc/init.d/xinetd restart

OR

#service  xinetd restart

Step5: Go to one remote hosts, then execute the rsh command to login the this server to verify if it can direct to login without password. or just run the below command to verify:

#rsh  devops1.osetc.com date

done….