Date: Sat, 27 Dec 2008 10:40:18 -0500 From: Lowell Gilbert <freebsd-questions-local@be-well.ilk.org> To: Noah <admin2@enabled.com> Cc: User Questions <freebsd-questions@freebsd.org> Subject: Re: running shell command through ssh tunnel Message-ID: <44bpux7hjx.fsf@lowell-desk.lan> In-Reply-To: <4955887F.1090704@enabled.com> (Noah's message of "Fri\, 26 Dec 2008 17\:44\:31 -0800") References: <4955887F.1090704@enabled.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Noah <admin2@enabled.com> writes: > 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/' Maybe I haven't had enough coffee yet, but wouldn't that just be ssh noah@192.168.1.20 'chown -R noah:noah /shares/internal/Music/' ? You might even want to use '-n' as an option to the ssh command. -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44bpux7hjx.fsf>