Automatic rsh login to BSD Box

2007-02-14 Thread Ashok TM

Hi

I have 2 BSD boxes, want to acheive automatic rsh  login from one BSD box to
other.
I tried placing host name of the  boxes in .rhosts file  of the boxes under
~root  directory.
This works fine with user account and  I am able to  remotely execute
commands on the other box with rsh.

Eg:
==
rsh  bsd2 df
bsd2 - host
df - command

But with super user account , i get error as
rshd: Login incorrect.   which basically is * Login incorrect.*   No
password file entry for the user name existed or the authentication
procedure described above failed.Though i have password file entry of root
in each of the BSD boxes


~atm
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Automatic rsh login to BSD Box

2007-02-14 Thread Garrett Cooper

Ashok TM wrote:

Hi

I have 2 BSD boxes, want to acheive automatic rsh  login from one BSD 
box to

other.
I tried placing host name of the  boxes in .rhosts file  of the boxes under
~root  directory.
This works fine with user account and  I am able to  remotely execute
commands on the other box with rsh.

Eg:
==
rsh  bsd2 df
bsd2 - host
df - command

But with super user account , i get error as
rshd: Login incorrect.   which basically is * Login incorrect.*   No
password file entry for the user name existed or the authentication
procedure described above failed.Though i have password file entry of root
in each of the BSD boxes


~atm


You know you can do this with SSH and host keys, right? It's a more 
secure than doing stuff via rsh.


Just do the following:

1. Uncomment PermitRootLogin without-password in /etc/ssh/sshd_config.
2. As root run ssh-keygen, pick your cypher and password, and then put 
it in .ssh/authorized_keys on the remote host.

3. Restart the serving host's sshd using /etc/rc.d/sshd restart.

Voila. Much better than using rsh.

(I admit I skipped or glossed over a few steps, but if you want more 
information they're available in the manpages :)..).


-Garrett
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]