From owner-freebsd-questions@FreeBSD.ORG Sat Dec 27 01:44:44 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 575C6106564A for ; Sat, 27 Dec 2008 01:44:44 +0000 (UTC) (envelope-from admin2@enabled.com) Received: from typhoon.enabled.com (typhoon.enabled.com [216.218.220.21]) by mx1.freebsd.org (Postfix) with ESMTP id 2E2DC8FC2A for ; Sat, 27 Dec 2008 01:44:44 +0000 (UTC) (envelope-from admin2@enabled.com) Received: from [192.168.1.174] (76-14-72-6.sf-cable.astound.net [76.14.72.6] (may be forged)) (authenticated bits=0) by typhoon.enabled.com (8.14.3/8.14.3) with ESMTP id mBR1ia6Y025621 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 26 Dec 2008 17:44:42 -0800 (PST) (envelope-from admin2@enabled.com) Message-ID: <4955887F.1090704@enabled.com> Date: Fri, 26 Dec 2008 17:44:31 -0800 From: Noah User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: User Questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: running shell command through ssh tunnel 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: Sat, 27 Dec 2008 01:44:44 -0000 Hi there, I am trying to run a shell command to the host at the far end of an ssh tunnel. Here is how I structured access. Is there any way to do this more compactly on one line? ssh -L 12345:192.168.1.20:22 noah@domain.com ssh -p 12345 localhost 'chown -R noah:noah /shares/internal/Music/' Cheers, Noah