How can I ssh into a server and set an environment variable for the remote shell session? Ideally I'd like to control the name and value of the variable from the origin host.
|
feedback
|
|
SSH into the machine and then run | |||
|
feedback
|
|
Use "SendEnv" configuration variable of ssh. see | |||
feedback
|
|
If you're running a single-shot command on the remote side, something like this may work for you:
You can string multiple commands together as well:
| |||
|
feedback
|
|
Depends of shell used on remote host. Check this link: | |||
|
feedback
|