Re: running shell command through ssh tunnel

On Fri, Dec 26, 2008 at 01:15:03PM -0800, Noah wrote:
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: noah@xxxxxxxxxx
ssh -p 12345 localhost 'chown -R noah:noah /shares/internal/Music/'

ssh -t noah@xxxxxxxxxx ssh chown -R noah:noah /shares/internal/Music/

There is a difference between these two in terms of how authentication is
done. In yours, the authentication pairs are the client and;
and the client and (via the tunnel). In mine, the pairs
are the client and; and and This
makes a difference if you're using keys (not passwords): in yours, you
would have both keys on the client machine, whereas in mine, you'd
have the key for on the client machine, and the key for on

You can omit the -t if you're using keys; you need it if
prompts for a password.

Relevant Pages

  • Re: Venting steam: Autokey in 4.2.6/4.2.7
    ... Roll keys for all group members using ntp-keygen with no options other than the -T option for the trusted hosts. ... Add the ident option to the client server command with name the same as the client keys installed. ... For broadcast clients, use the same files, but use the ident option in the crypto command instead. ...
  • Re: D3 b-tree problem
    ... Pushing a tool past the limits of what ... dates to gather the required keys. ... using D3's ability to see the spooler entries as a regular item. ... > I have a client who is experiencing some problems with SELECTs on a very ...
  • Re: VPN versus Terminal Server for remote workers
    ... call a 'cell phone' we call a 'mobile', ... Windows VPN client, Windows Mobile VPN client, or a 3rd party VPN client. ... It is tunnel to the appliance or nothing. ...
  • Re: [fw-wiz] VPN Split-tunneling: Your opinion?
    ... Do you consider a split-tunnel setup to be particularly risky to allow ... I think, for client VPN configurations, that split tunnel versus full tunnel ...
  • Re: Enterprose Manager after user password change
    ... XP client machines with a non-Domain account. ... > registered servers when the user's network password is changed. ... Saving the keys and restoring ... > password should be written to the registry. ...