From owner-freebsd-questions@FreeBSD.ORG Tue Oct 10 22:03:27 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8406416A403 for ; Tue, 10 Oct 2006 22:03:27 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.176]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB17043D6E for ; Tue, 10 Oct 2006 22:03:25 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin05-en2 [10.13.10.150]) by smtpout.mac.com (Xserve/8.12.11/smtpout06/MantshX 4.0) with ESMTP id k9AM3PuH019525; Tue, 10 Oct 2006 15:03:25 -0700 (PDT) Received: from [17.214.13.96] (a17-214-13-96.apple.com [17.214.13.96]) (authenticated bits=0) by mac.com (Xserve/smtpin05/MantshX 4.0) with ESMTP id k9AM3Jns022440; Tue, 10 Oct 2006 15:03:24 -0700 (PDT) In-Reply-To: <452C16E0.1010903@pobox.sk> References: <715841970607251003o1d358d3dl894291f50a0b8053@mail.gmail.com> <200607261247.53917.nvass@teledomenet.gr> <452C16E0.1010903@pobox.sk> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Tue, 10 Oct 2006 15:03:18 -0700 To: martinko X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: freebsd-questions@freebsd.org Subject: Re: ssh tunnel - remote access through nat 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: Tue, 10 Oct 2006 22:03:27 -0000 On Oct 10, 2006, at 2:55 PM, martinko wrote: > [ ... ] > The thing is that if I just simply create an rc script to achieve > this, > the script is run under root and ssh cannot make use of public key > authentication which is set up now for a user running it manually. > Or is there a way to change identity somehow or to run an rc script > under different user account ?? Of course. One can use "su -" to run a command under another user, or use the "ssh -i" option to pass the user's identity (ie, their SSH private key) directly... -- -Chuck