From owner-freebsd-questions Tue Jun 12 4:59:17 2001 Delivered-To: freebsd-questions@freebsd.org Received: from alligator.wananchi.com (alligator.wananchi.com [62.8.64.108]) by hub.freebsd.org (Postfix) with ESMTP id D35DF37B416 for ; Tue, 12 Jun 2001 04:59:00 -0700 (PDT) (envelope-from wash@alligator.wananchi.com) Received: from wash by alligator.wananchi.com with local (Exim 3.22 #1) id 159mmk-0005w8-00; Tue, 12 Jun 2001 14:56:38 +0300 Received: from [209.198.248.2] (helo=siafu.iconnect.co.ke) by poeza.iconnect.co.ke with esmtp (Exim 3.20 #1) id 14do3R-000AAl-00 for wash@poeza.iconnect.co.ke; Fri, 16 Mar 2001 09:49:41 +0300 Received: from [212.22.161.3] (helo=ns2.iconnect.co.ke) by siafu.iconnect.co.ke with esmtp (Exim 2.12 #1) id 14dnzO-0002wk-00 for wash@iconnect.co.ke; Fri, 16 Mar 2001 09:45:30 +0300 Received: from amavis by ns2.iconnect.co.ke with scanned-ok (Exim 3.12 #1) id 14do1T-000N3l-00 for wash@iconnect.co.ke; Fri, 16 Mar 2001 09:47:39 +0300 Received: from isy.liu.se ([130.236.48.10]) by ns2.iconnect.co.ke with esmtp (Exim 3.12 #1) id 14do1K-000Miq-00 for wash@iconnect.co.ke; Fri, 16 Mar 2001 09:47:33 +0300 Received: from lagrange.isy.liu.se (lagrange.isy.liu.se [130.236.49.127]) by isy.liu.se (8.11.2/8.11.2) with ESMTP id f2G6l9905205; Fri, 16 Mar 2001 07:47:09 +0100 (MET) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010315145408.A24595@poeza.iconnect.co.ke> Date: Fri, 16 Mar 2001 07:47:08 +0100 (CET) From: Micke Josefsson To: Odhiambo Washington Cc: FBSD-Q Subject: RE: SSH and remote execution of tasks Status: RO Lines: 49 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 15-Mar-01 Odhiambo Washington wrote: > Hi, > I am sorry if this has been discussed before. I just have to ask because I > did not find the answer in the man page. > We've disabled telnetd in a couple servers that we have so we have > resorted to SSH. I have seen discussions on the list regarding the > running of a task on a remote machine without the option of login to a > shell. > > Now my Q is, where do I get all these details? I have a case where I have > to run a script to update user accounts and since a few people use the > same script we decided to give little executionary privilege via sudo. > So I am in my shell on hostA and all I want to do is run scriptX on hostB > via ssh. I always have to verify my passwd when running scriptX from a > shell isn hostB. How do I do that via SSH? > The user you are impersonating on HostB must have your public key from HostA in his /~/.ssh/authorized_keys. The host-keys (in /etc/ssh/...) public parts also have to be exchanged and implanted into each others /etc/ssh/authorized_keys It took me a bit of testing to get to this - specially since there are both RSA and DSA keys to manipulate if fallback to ssh1 is used. > > -Wash > > -- > Odhiambo Washington Inter-Connect Ltd., > wash@iconnect.co.ke 5th Flr Furaha Plaza > Tel: 254 11 222604 Nkrumah Rd., > Fax: 254 11 222636 PO Box 83613 MOMBASA, KE. > > It is illegal to drive more than two thousand sheep down Hollywood Boulevard > at one time. ---------------------------------- Michael Josefsson, MSEE mj@isy.liu.se This message was sent by XFMail running on FreeBSD 4.3-BETA ---------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message