Re: Help: rsh without password



On Thu, 27 Dec 2007 22:30:45 +0800, Amy Lee wrote:

On Thu, 27 Dec 2007 14:04:47 +0000, Dave Uhring wrote:

On Thu, 27 Dec 2007 20:24:53 +0800, Amy Lee wrote:

I'm building a Linux clusters so the clusters need log in nodes each
other. I use rsh as a communication. I use RHEL 3, user is root user.

Rethink that. OpenSSH using key-based authentication is the best way
to do what you wish.

However, I use which command to find out where rsh is, it shows
/usr/kerberos/bin/rsh
And in /etc/xinit.d directory I can't find the rsh, rlogin, and rexec
daemons.

Probably because they have been deprecated and thus omitted from your
distro, and for very good reasons.

So my problem is how to enable rsh to log in nodes without password.

Use ssh instead. Create RSA keys for yourself:

$ ssh-keygen -t rsa

Copy your ~/.ssh/id_rsa.pub to the
remote_systems:/home/amy/.ssh/authorized_keys.

Thank you very much. So from your words I have to reinstall rsh?

Amy

NO NO NO!!! You don't want to use rsh, it's obsolete. SSH is already
installed on all of your systems, ssh does everything that rsh did and
more. As Dave told you the way to make ssh operate seamlessly is to
generate a puplic/private key pair by doing

ssh-keygen -t rsa

This will put your keys into the directory .ssh. You should then take
your public key, which is in
~/.ssh/id_rsa.pub
and copy it into
~/.ssh/authorized_keys

The you should should copy the .ssh directory into you home directories
on all of the machines in your cluster. You will probably have to enable
ssh on your systems. The really easy way to do this is to install webmin,

http://www.webmin.com

Webmin is a browser based admin tool that works on just about every
distro,. After you have downloaded and installed webmin you access it
from your web browser by goign to http://machinename:10000. In webmin go
to the servers/ssh server section and configure ssh anyway you want,
webmin makes everything self explanatory. You will also want to use
webmin for SAMBA and NFS and just about any other server you have to
administer, it's much easier to use that any distro based config tools
that I've seen.

After you have set it up all you have to do to log into another machine is
ssh machinename

To execute a program on another machine you do

ssh machinename program

To copy from one machine you can do either scp or rsync, for example to
copy the directory foo do

rsync -r -t foo machinename:/home/me

----------------------------------------------------
One more thing, you should never be running as root, that's dangerous and
pointless. Running as root is a bad habit from the Windows world, in
Linux the only reason to be running as root is to do an admin task. And
even when doing an admin task you never log in as root, you either use
Webmin, use a root shell, or do sudo on the command.

.



Relevant Pages

  • Re: KDE
    ... It's not open to WAN because everything I do with Webmin I do ... But as I do not allow root login via ssh, ... Open minds. ...
    (alt.os.linux.suse)
  • RE: Linux hacked
    ... Also, what exactly did the history file show, can you paste it into a mail ... > First let me say I'm a security novice. ... > been unsuccessful in getting root back. ... > via ssh but you could su in once logged in as one of three users. ...
    (Security-Basics)
  • Re: Linux hacked
    ... To find out what kernel version you are running, type "uname -a" without ... > been unsuccessful in getting root back. ... > via ssh but you could su in once logged in as one of three users. ...
    (Security-Basics)
  • RE: Linux hacked
    ... hack the box, pull the drive and save it. ... Use the newest versions of Gentoo, Apache, SSH, PHP and Squirl Mail. ... been unsuccessful in getting root back. ... I found a hidden directory /var/tmp/.tmp that has a bunch of directories ...
    (Security-Basics)
  • RE: Linux hacked
    ... Was any of the sites running a php nuke or another portal or system that is vuln ... been able to use that with a locla root exploit to gain root on the machine. ... > hack the box, pull the drive and save it. ... > Use the newest versions of Gentoo, Apache, SSH, PHP and Squirl Mail. ...
    (Security-Basics)