Noah <adm...@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 n...@domain.com
> ssh -p 12345 localhost 'chown -R noah:noah /shares/internal/Music/'

Put something like the following in your ~/.ssh/config:

Host otherhost
  HostKeyAlias otherhost
  ProxyCommand ssh n...@domain.com nc 192.168.1.20 22

Then you can simply run:

ssh otherhost 'chown -R noah:noah /shares/internal/Music/'


Reading the ssh_config man page might reveal a number of other nice
features ssh has to offer.

-- 
Christian Laursen
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to