Executing command remotely with ssh, and PATH
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,
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
Can anyone put me straight?
More information about the ubuntu-users