Rsh passwordless entry

Hello guys,

I am trying to get rsh between 2 ubuntu 12.04 servers.

as of now I have installed rsh-server, xinetd
I have made entries of hosts in the /etc/hosts
entered host-names in /etc/hosts.allow, .rhosts, /etc/hosts.equiv

Firewall is flushed, no rules.

I can't for the love of god find a proper documentation on how to go about doing this. Also I want to avoid using ssh-keygen at the moment.
I appreciate any help I can get.
Thank you

sshd service enables

rsh remotehost command

and rcp from and to the remotehost.
NB interactive login

rsh remotehost

is rlogin, a different service/port that requires rlogind.

You need to open a simple telnet session from A to B first, then look at where the login is from:-

ServerA telnet ServerB
Login: username
Password: password

Welcome to ServerB!

ServerB who am i
username    pts/t0    aaa.bbb.ccc.ddd

Now you can use this information as it is displayed. Hopefully aaa.bbb.ccc.ddd is a name rather than an IP address as you have included it in /etc/hosts (ServerB will have done a lookup) but really all you need to do is to add the address into your .rhosts file in your home directory rather than the global /etc/hosts.equiv which permits wider access. Esure that this file is RW to yourself and no-one else:-

ServerB chmod 700 .rhosts

Then exit the telnet session to ServerB and from ServerA again, try:-

ServerA rsh ServerB hostname

Hopefully it will display the hostname of ServerB and you can then try variations on the command. Quoting and knowing which shell with expand metacharacters or interpret variables can be quite tricky though.

Have a go and let us know how you get on. I hope that this helps.

If you still can't get on, check that the port is listening. You are after ports 513 & 514. If they are not listening, you may have to alter /etc/xinet.d/* to make sure that they are not disabled. Do not save backup versions of these files in the same directory or they will be considered live too, which can get messy - he says from experience :o

Robin
Liverpool/Blackburn
UK

telnet connection is refused.

I am able to rsh with password.

who am i 

shows the hostname that I am connected to.

I have added entries in /etc/securetty "rsh and rlogin"

ports 513 and 514 are not listening.

There is no service like rsh and isn't rsh controlled by xinetd
so if I start xinetd rsh should start? and I did start it, but still rsh without password did not work.

Any ideas? :mad:

Please don't be mad :mad:, we're all trying to help.

I thought that /etc/securetty was a list of terminals that would accept a root login. I'm not sure how you have 'added entries' for rsh & rlogin. Please explain and I may learn something too.

I was under the impression that xinetd does indeed control rsh server (alias rexec) and rlogin. Have a look in /etc/xinetd.d and you should find a file for each. There will be a statement within each to disable the service. You will need to set it to no and restart xinetd with service xinetd restart Maybe it's ports 512 & 513 rather than 513 & 514.

Regards,
Robin