problem with rsh
i m trying to write script using perl and that too with rsh ..
problem here is i m getting this message.. connect to address 192.168.20.172: Connection refused Trying krb4 rlogin... connect to address 192.168.20.172: Connection refused trying normal rlogin (/usr/bin/rlogin) 192.168.20.172: Connection refused how to overcome and i have to complete this... pls help regarding this |
CPCAPP108 & CPCAPP110 are 2 servers who need rsh to & fro
==================| CPCAPP108 config:-| ==================| vim /etc/hosts.equiv CPCAPP110 vim /root/.rhosts CPCAPP110 Set the permissions on the file to 600. chmod 600 /root/.rhosts vim /etc/securetty rsh rlogin vim /etc/xinetd.d/rsh disable = no vim /etc/xinetd.d/rlogin disable = no 3 files /usr/bin/rsh /usr/bin/rcp /usr/bin/rlogin should have SUID bit set on it i.e chmod u+s /usr/bin/rsh /usr/bin/rcp /usr/bin/rlogin /etc/init.d/xinetd restart then do rsh CPCAPP108 from CPCAPP110 server. ==================| CPCAPP110 config:-| ==================| vim /etc/hosts.equiv CPCAPP108 vim /root/.rhosts CPCAPP108 Set the permissions on the file to 600. chmod 600 /root/.rhosts vim /etc/securetty rsh rlogin vim /etc/xinetd.d/rsh disable = no vim /etc/xinetd.d/rlogin disable = no 3 files /usr/bin/rsh /usr/bin/rcp /usr/bin/rlogin should have SUID bit set on it i.e chmod u+s /usr/bin/rsh /usr/bin/rcp /usr/bin/rlogin /etc/init.d/xinetd restart then do rsh CPCAPP110 from CPCAPP108 server. |
Also make the necessary entries in /etc/hosts
I'll like to tell u rsh is not secured, instead if possible use ssh I hope it helps |
Quote:
but now my officials are saying to use ssh .. but due to its high security, i cant make my perl scripts to execute commands in another system... u got the problem??.. |
Can u elaborate what problem r u facing
|
Quote:
but ssh is asking me password every time and after giving password i can access through the terminal and not with my script (perl script not working, the initial connection to system2 can be made thro' perl script), rest i am using terminal.. so its not automation at all... my officials r saying tat, bcos of security in ssh, i cant able to run my script ..so kindly help me.. |
if u want to access ssh without that can be done.
if u want password less connection between server 1 to server 2 for root user then login on server 1 thru root. then use command ssh-keygen -t rsa, it will generate rsa key pair. keep pressing enter it will make the rsa key for u. copy this key & login to server2 using root & paste the key in /root/.ssh/authorized_keys file.if the file does not exist then create it using touch. if .ssh folder is not there then just ssh server1 from server2 & u will get the .ssh folder. once key of server1 is placed in server2 then u can ssh from server1 to server2 without password. |
see http://sial.org/howto/openssh/publickey-auth/ for howto on setting up automatic ssh logins. For security reasons, I wouldn't do it as root.
|
All times are GMT -5. The time now is 06:14 PM. |