LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Can't login with rsh (https://www.linuxquestions.org/questions/linux-general-1/cant-login-with-rsh-741999/)

Darrell22 07-22-2009 12:33 PM

Can't login with rsh
 
Hello,

I'm having some trouble with rsh.

rsh is used as part of an Oracle startup script.
It keeps failing at that part of the script.


which rsh
/usr/bin/rsh


If I do a single line command at the prompt, I get:

#rsh bronze.gateway.2wire.net
Password:
Password:
Login incorrect



But if I use ssh:

#ssh bronze.gateway.2wire.net
root@bronze.gateway.2wire.net's password:
Last login: Wed Jul 22 09:55:58 2009 from bronze.gateway.2wire.net

- worked.


chkconfig shows:

chkconfig --list |grep -i rsh
rsh: on

chkconfig --list |grep -i rlogin
rlogin: on

chkconfig --list |grep -i rexec
rexec: on


How do I need to get the rsh login to work?

Thanks a lot!

lcoronato 07-22-2009 01:45 PM

Hi,

You can use the command:

# rsh -v bronze.gateway.2wire.net


So show more details regarding the connection.
Post the output of the command.

Leandro

ramram29 07-22-2009 02:25 PM

Dude, don't use rsh - it is very insecure and obsolete. Use ssh instead - it does everything that rsh does but with encryption. Using rsh and not ssh is the equivalent of fighint with a plastic spoon in you hand instead of a AK-47 with a bayonette.

Darrell22 07-23-2009 02:04 PM

Got rsh working
 
Thanks. I worked with Oracle, and got it working.

The real issue was that the dbora script needed it
for autostart and shutdown on (re)booting.

But good point. Why not ssh?


Secret was to:

which rsh
/usr/kerberos/bin/rsh

mv /usr/kerberos/bin/rsh /usr/kerberos/bin/rsh.original
mv /usr/kerberos/bin/rcp /usr/kerberos/bin/rcp.original
mv /usr/kerberos/bin/rlogin /usr/kerberos/bin/rlogin.original

and use instead:

which rsh
/usr/bin/rsh


edit the files:

cat /etc/hosts.allow
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
bronze
bronze.gateway.2wire.net


cp /etc/hosts.allow /root/.rhosts
chmod 644 .rhosts

cat /root/.rhosts
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
bronze
bronze.gateway.2wire.net



edit /etc/hosts.equiv

cat /etc/hosts.equiv
+bronze root
+bronze.gateway.2wire.net root



cp /root/.rhosts /home/oracle11/.rhosts

cat /home/oracle11/.rhosts
bronze
bronze.gateway.2wire.net

change the ownership, and group.


And then I could login. What a lot of work.

rsh bronze
Last login: Thu Jul 23 12:01:45 from bronze.gateway.2wire.net


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