LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-03-2009, 03:28 AM   #1
ssenthilkumar
Member
 
Registered: Apr 2009
Posts: 38

Rep: Reputation: 15
Question 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
 
Old 04-03-2009, 03:37 AM   #2
maxy7710
Member
 
Registered: Jan 2008
Location: Mumbai, india
Distribution: REDHAT, FEDORA,SUSE, UBUNTU, ORACLE ENTERPRISE LINUX & SOLARIS 10
Posts: 130

Rep: Reputation: 17
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.
 
Old 04-03-2009, 03:39 AM   #3
maxy7710
Member
 
Registered: Jan 2008
Location: Mumbai, india
Distribution: REDHAT, FEDORA,SUSE, UBUNTU, ORACLE ENTERPRISE LINUX & SOLARIS 10
Posts: 130

Rep: Reputation: 17
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
 
Old 04-03-2009, 04:58 AM   #4
ssenthilkumar
Member
 
Registered: Apr 2009
Posts: 38

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by maxy7710 View Post
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
thanks...

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??..
 
Old 04-03-2009, 05:18 AM   #5
maxy7710
Member
 
Registered: Jan 2008
Location: Mumbai, india
Distribution: REDHAT, FEDORA,SUSE, UBUNTU, ORACLE ENTERPRISE LINUX & SOLARIS 10
Posts: 130

Rep: Reputation: 17
Can u elaborate what problem r u facing
 
Old 04-03-2009, 07:54 AM   #6
ssenthilkumar
Member
 
Registered: Apr 2009
Posts: 38

Original Poster
Rep: Reputation: 15
Question

Quote:
Originally Posted by maxy7710 View Post
Can u elaborate what problem r u facing
actually i am trying to run a perl script on say like i m working in system1, ill try to access a perl script that is there in system2, through ssh (previously rsh, but tats not working for debian.. i m using debian)...

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..
 
Old 04-03-2009, 08:12 AM   #7
maxy7710
Member
 
Registered: Jan 2008
Location: Mumbai, india
Distribution: REDHAT, FEDORA,SUSE, UBUNTU, ORACLE ENTERPRISE LINUX & SOLARIS 10
Posts: 130

Rep: Reputation: 17
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.
 
Old 04-03-2009, 08:21 AM   #8
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,191

Rep: Reputation: 105Reputation: 105
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.

Last edited by choogendyk; 04-03-2009 at 08:24 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsh problem meghakolombkar Linux - Software 5 04-11-2006 03:43 AM
rsh problem tanniru Linux - Security 1 03-27-2006 08:11 AM
rsh problem~~ Dessan Linux - Networking 2 01-23-2006 01:13 AM
RSH: remuser too long error when rsh is executed from IIS dev33445 Programming 0 08-29-2005 10:34 AM
rsh problem hinetvenkat Linux - General 1 04-22-2005 06:19 AM


All times are GMT -5. The time now is 04:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration