Passwordless RSH and a Noob

Good day all.

I am verry sorry if this has already been asked on here, but i couldn’t find any helpfull info on this matter, o and by the way, this is my first day of using openSUSE so i am an extreme noob!

Heres the issue, im doing some cfd calculations with Star-CCM+ and recently the models have gotten to large to be able to run on a single machine so i need to run the simulations in parallel over a couple of machines and for this I need to setup passwordless RSH.

What i have figure out sofar is that the following files needs to be setup correctly in order to get RSH working without the need for passwords:

ect/hosts
ect/hosts.equiv
home/“user”/.rhosts

The hosts and hosts.equiv files I can find but I cant seam to find the .rhost file even after installing rsh and rsh-server. Should i just create this file or am i missing something?

Also, can the info inside these files be the same with regards to comtaining all the IP adresses and aliases of the other machines being used along with the machine on which the file is contained or should, say the hosts file, only contain the IP of the other machine and not the machines IP on which the file is situated?

Lastly, the content of these files, would it be sufficient to only spesify the IP adress of each and every machine along with the alias which the machine uses for example:

159.160.28.87 Host1
159.160.28.88 Host2

Im sorry for the long post but im really stumped on how to get this going so any help will be greatly appreciated.

Regards

Henco

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is there a reason you must use rsh? Are you using rsync perhaps? If so
you can probably use SSH and make that passwordless using public/private
keys. SSH comes enabled and ready by default on almost every OS you’ll
find (need to open the TCP port in the firewall) and you can use rsync
with the SSH command to do what you are after. SSH is also secure where
rsh is completely open to the world.

Good luck.

Henco wrote:
> Good day all.
>
> I am verry sorry if this has already been asked on here, but i couldn’t
> find any helpfull info on this matter, o and by the way, this is my
> first day of using openSUSE so i am an extreme noob!
>
> Heres the issue, im doing some cfd calculations with Star-CCM+ and
> recently the models have gotten to large to be able to run on a single
> machine so i need to run the simulations in parallel over a couple of
> machines and for this I need to setup passwordless RSH.
>
> What i have figure out sofar is that the following files needs to be
> setup correctly in order to get RSH working without the need for
> passwords:
>
> ect/hosts
> ect/hosts.equiv
> home/“user”/.rhosts
>
> The hosts and hosts.equiv files I can find but I cant seam to find the
> .rhost file even after installing rsh and rsh-server. Should i just
> create this file or am i missing something?
>
> Also, can the info inside these files be the same with regards to
> comtaining all the IP adresses and aliases of the other machines being
> used along with the machine on which the file is contained or should,
> say the hosts file, only contain the IP of the other machine and not the
> machines IP on which the file is situated?
>
> Lastly, the content of these files, would it be sufficient to only
> spesify the IP adress of each and every machine along with the alias
> which the machine uses for example:
>
> 159.160.28.87 Host1
> 159.160.28.88 Host2
>
> Im sorry for the long post but im really stumped on how to get this
> going so any help will be greatly appreciated.
>
> Regards
>
> Henco
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJJ8Jd4AAoJEF+XTK08PnB5q5EQAKHiCsbxcsL5MDRq1U1G2SVr
dd+ahSuYq87hTHBdqUz5O+ULU0ebkCuNMkJ1m0uq8gM0/Z5lI/ZHolS4mYam52Xk
EgfDVE8qZgx9o1NJSsZdn1HPEfw6Giju00hMUPGOdy5SVLqRwoo1bQKFtFiObZzK
yWLxwuV/VjwznLOTe9nIka89+2LTTRwVNg9vXvf2/c8bl5dj8RDadTtLO/JP0RfE
JCOD98ywNyGXxtCfiY98IpUC5crfP6JB+78t7nrtIQBHwN6UGtvsRfronwDtJCno
mW++y5a8CpYzpfuVNrrUGqQvi703bVTcUgXZP6BtNY6IzVeyZP5SkUJ+LHB6FKgS
MZuE41e4wMlY/RizgrOq4VHViDwaxESvjrKxqEq6W8biwPsHN8N/2vXvJmHF729w
d0BrMHMySdkru0NhJ2ufcH7hvQ8Sqw7yeWI4nl582v1vgA5AtnCWMhckrC82XyYf
WxhzGe9fAxpHPj4EH/aRRaYXroVUQMXbBvDX+5BrDlSERaOj7Qd4yyC0BgwgSRH9
Lpvea7g37MNDZ0i9tFlzVm83iUVjUDeT7P/oEcIrnjzbBxXHsoojmiDO5R81rbL7
lxV5a2fPUmUYb6tW39F55I2pfpsD3kCiE4uqo7lPn4MfHvb3ps3OX8UQg8sCMd8f
AP4Jz48OOHzIulbVXZgh
=Bi4G
-----END PGP SIGNATURE-----

I would agree with ab that you should use ssh instead of rsh. rsh is extremely insecure and is usually a bad idea.

As far as your problem of not seeing .rhosts, you should know that any file that begins with a . on a linux system is hidden. To be able to see it you can use

ls -a

from a terminal. If it isn’t there at all, you can just create the file.

Thanks guys.

I am not to sure about using rsync, i’ll look in to it. As far as using rsh, i think its the only way Star-ccm can communicate between the machines and the software suppliers also told me that I need to setup passwordless rsh for this reason so i guess theres no getting away from it.

The thing that bothers me the most is that al the computers are on a campus network so its not the securest of networks. Luckily, all the IP’s on the machines are static, so i guess that adds a bit af extra security.

I still cant find the .rhost file so it seams as though i’ll have to create it.

One question, should the machines IP, on which these files are stored, also be included in the Hosts, hosts.equiv and .rhosts files?

Thanks again

Henco

Soory to post again like this, but where should the .rhosts file be located? In the home directory (/home/.rhosts) or in the user directory (/home/“user”/.rhosts)?

According to here:
Cannot run Star-CCM+ parallel in Linux – CFD Online Discussion Forums you should be able to run it with ssh using the option -rsh ssh. You will have to setup passwordless ssh though.

The thing that bothers me the most is that al the computers are on a campus network so its not the securest of networks. Luckily, all the IP’s on the machines are static, so i guess that adds a bit af extra security.

If these computers are on a campus network with public IPs, I would definitely do everything in my power to not use rsh. The only time I ever use it is if all machines are on a private network, meaning that the only machines that can see them at all are trusted.

I still cant find the .rhost file so it seams as though i’ll have to create it.

One question, should the machines IP, on which these files are stored, also be included in the Hosts, hosts.equiv and .rhosts files?

Thanks again

Henco

Yes, you will probably have to create the .rhosts file. It should be in /home/henco/ (or whatever your username is). I believe you need the entry in hosts.equiv, but not necessarily in hosts. However, it might be a good idea to add it there as well.

Good luck and let us know how it goes.

elserj

Thanks for the advice.

I’ll see if i can get starccm+ to use ssh rather than rsh because its a secure connection and ssh is already setup (only need to make it passwordless).

I still would like to figure out how to setup passwordless rsh.

To see if i can rsh to my own machine i setup the /etc/hosts and /etc/hosts.equiv files to contain only my machines IP and after creating the /home/Henco/.rhosts file, i added the IP to there aswell.

I checked that that rhs was enabled with the code: chkconfig --list rsh and it said that rsh was on.

Then i ran the following command: /etc/rc.d/xinetd restart

After this i tried to rsh my own machine using the code: rsh 186.123.38.42. After waiting for what seamed like forever i got an message saying: 186.123.38.42: Connection Refused

If i however ssh my own machine i have no problem what se ever to connect to it. I can even ssh to the other suse machines in the labs across from me.

Does any body have an idea where the problem may be? Is it because i may not have all the required repositories installed or the fact that i had to create the .rhosts file?

Any help would be greatly appreciated

Thanks

Henco

Again, I would suggest using ssh instead, but if you insist on using rsh, it sounds like the rsh service is either not started on the server, or the firewall is not letting it through. Try all the steps from Connection refused rsh - LinuxQuestions.org.

Thanks for the advice sofar.

Ok so i went back to the basics and started from scratch. Im still new to all of this so heres the info i have:

My Computer’s name is: MidKnight
My “User” name on Suse us: Henco
My Login password is: *******
My root password is :&&&&

First off i wanted to see if i can rsh mysel so i reconfigured my /etc/hosts file which now looks like this:
*
127.0.0.1 localhost

special IPv6 addresses

::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
127.0.0.2 linux-bwcu.site linux-bwcu

168.120.20.48 Henco Zabimaru*

Then i added Zabimaru to the /etc/hosts.equiv and the /home/Henco/.rhosts files.

Adiotionally i added rsh, rlogin and rexec to the /etc/securetty file.

I also edited the /ect/pam.d/rsh and /etc/pam.d/rlogin files as follow:

RSH File:

auth required /lib/security/pam_rhosts_auth.so
auth required /lib/security/pam_securetty.so
auth required /lib/security/pam_nologin.so
auth required /lib/security/pam_env.so
account required /lib/security/pam_stack.so
service=system-auth
session required /lib/security/pam_stack.so
service=system-auth

rlogin File

***auth sufficient /lib/security/pam_rhosts_auth.so
auth required /lib/security/pam_securetty.so
auth required /lib/security/pam_nologin.so
auth required /lib/security/pam_env.so
auth required /lib/security/pam_stack.so
service=system-auth
account required /lib/security/pam_stack.so
service=system-auth
password required /lib/security/pam_stack.so
service=system-auth
session required /lib/security/pam_stack.so
service=system-auth


This seamed to get rsh going, however on the command rsh Zabimaru I immediately get an responce saying Login incorrect.

I am then promted for a login user name and a password. Using my user name “Henco” and login password ******* i am able to login into my own pc. I have checked the net on how to make this login automatic but it seams as though everything is setup correctly for automatic login.

Any ideas on what might be wrong or missing?

Lastly, how do i change the permission on the /etc/.rhost file to 600? I cant find a way to do it.

Regards

Henco

I don’t immediately see the problem, and your /etc/pam.d/rsh and rlogin files look the same as what I have.

As far as changing the permissions, use the program chmod like this

chmod 600 *file*

Thanks for all the help sofar. I apreciate it.

As for the error message saying “Login Incorrect”. I figured out that, before I rsh myself, if I am logged into Root, I get this message, but once i exit Root and rsh myself again I am only promted for my password, like i would be if my system went in standby and i wanted to log in to use it again. I’ll keep digging to see if i can solve this issue.

Atleast now I can utilise all 4 my cores in parralel in star-ccm+ wich i was previously not able to do, so thanks again. I’ll see tomorrow if i can get rsh working on a couple of the machines in our labs and setup a parallel simulation between them.

BTW, i have read about the insecurity of rsh, but it seams to me that your pc is only at risk if the IP’s of the machines using rsh doesn’t stay static or are there other ralated issues due to the fact that the data being sent backwards and forwards arn’t encrypted?

Thanks again for all the assistance.

Regards

Henco

The main problem as I understand it is that nothing is encrypted between the machines. Which means that any passwords or data going across is open for the world to read. Also, the less points of entry you have to a machine, the smaller the chance of having an intruder get access to the machine. Whether the IP is static or not doesn’t really make a difference that I can see. Usually the attacks are brute force (look into blockhosts or denyhosts) and any IP is available, no matter how it is assigned.

The only advantage rsh has over ssh is that the computer doesn’t have to do any encryption, which in theory should make it faster. However, with the speed at which modern computers can do even moderate encryption levels, I don’t think it makes any noticeable difference. That is why in my opinion, there isn’t any reason to rsh.

Good to know, i contacted the support team from star-CCM+ and they said that parallel computation can only be done through rsh so it seams as though i have no other choice.

With regards to the passwordless login, should i specify the login passwords in the .rhosts or hosts.equiv file since i still cant get to login without a password. I have set the permissions on the .rhosts file to 644 and still nothing. Is there any other files that may need tweaking. This issue has me really stumped and i know to little about Suse to go and dig into the other files. Is there any other deamons (if thats the correct term that needs to be running to get it to login without the need for a password.

Thanks again for all the help

Regards

Henco

Ok i managed to get something correct.

I want 3 pc’s to rsh passwordless between then and to themselves. One is the master pc and two is worker pc’s.

on a linux machine, what is your username and your machines name, cause when i open a shell it says for example Derick@Concord with a file named Derick being found under the /home/ directory. Is Derick the username and Concord the computer name

The two worker pc’s are setup identically (hardware and software), the only diffirence between them is the computer name. They can rsh to one another and to themselves.

My master machine is a more powerful machine and has the same software as the two worker pc but has a totally different username. With this pc i am able to rsh passwordless internally but not to the other machines.

And when the master pc rsh’s the other two machines or one of them rsh’s the master pc, i am prompted for a password, but when i type in the normal login password for the particular machine it doesn’t accept it. After two attempts i am prompted for the user name (of the machine being rsh’ed) and password and onloy then can i log into that machine? Any idea’s whats wrong?

I also noticed that when i remove all entries from the /et/hosts.equiv file the two worker pc can no longer rsh passwordless like the .rhosts file is being ignored? Is there a problem with this file and should it be placed in the directory: /home/Derick

Any help would be greatly appreciated.

Hello SUSE friends! I am in the other users boat in that I need to get RSH working without a password. A Quick bit about the why: I work in a very large and reputable company and know quite a bit about Linux. I work in the R&D LAB and a particular team wants to do testing using RSH. I don’t know why they want to use RSH, but they want to use it, and I cannot convince them otherwise (I’ve tried for over a month). Anyways, I’m using SLES 11 SP2, and I cannot seem to find any information on how to get RSH working without a password. In my /etc/pam.d/rsh file, I do not have a line for pam_rhosts_auth.so, but only pam_rhosts.so. I have set this line to “auth sufficient” and restarted xinitd, to no avail. I have also added the entries to the /etc/hosts.equiv on the target server, also to no avail. I have been scouring the web and cannot seem to find any solid articles about using RSH or RLOGIN without password. All articles pertain to RHEL or Ubuntu, while the rest of the links may be forums deal with SLES and SUSE but convince the user (op) to try something different due to security. So I’ll say again, I understand the security implications, but the system I am using is in a completely physically closed environment with absolutely no outside access so it is completely safe from other than physical or social engineering attacks, and the TG needs passwordless RSH and RLOGIN for their tests. Any assistance would be greatly appreciated. Thanks! -S