Executing command remotely with ssh, and PATH
Colin Law
clanlaw at googlemail.com
Thu Aug 9 13:42:49 UTC 2012
There is apparently something I am not understanding about ssh or
environment variables. I can execute a command remotely using ssh,
something like
ssh remote_server "command_to_execute"
and that works ok. However in another case I need to add to the path
before executing the command so I to test the concept I tried
ssh remote_server "PATH=/some/path:$PATH; echo $PATH"
but it just shows the original path. If I login to the remote server
and copy/paste the above command then it shows the extended path as
expected.
Can anyone put me straight?
Colin
More information about the ubuntu-users
mailing list