From owner-freebsd-questions@FreeBSD.ORG Thu Feb 15 06:02:59 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B05EA16A408 for ; Thu, 15 Feb 2007 06:02:59 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout1.cac.washington.edu (mxout1.cac.washington.edu [140.142.32.134]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2F013C441 for ; Thu, 15 Feb 2007 06:02:59 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9] (may be forged)) by mxout1.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id l1F62xg4021097 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 14 Feb 2007 22:02:59 -0800 X-Auth-Received: from [192.168.10.41] (c-67-187-172-183.hsd1.ca.comcast.net [67.187.172.183]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id l1F62wog002236 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 14 Feb 2007 22:02:58 -0800 Message-ID: <45D3F790.8060108@u.washington.edu> Date: Wed, 14 Feb 2007 22:02:56 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.9 (X11/20070122) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.0.289146, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2007.2.14.214933 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: Automatic rsh login to BSD Box X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Feb 2007 06:02:59 -0000 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