Mosh appears to drop extra environment variables
Checklist
- [x] Using latest version on the App Store (TestFlight 17.2.1.865)
- [x] Read the docs
- [x] Searched for existing GitHub issues
Configuration
Blink 17.2.1.865 iOS 17.2.1
Describe the bug
Sending a custom environment variable (via SendEnv) (such as LC_DEVICE) is lost when connecting over mosh.
The variable is successfully set over SSH.
Steps to reproduce:
- Set SendEnv in .ssh/config (or host SSH config):
SendEnv LC_DEVICE
- Set env in host .blink/profile:
LC_DEVICE=test
- Confirm its set:
blink> echo $LC_DEVICE
test
- Confirm its set over ssh:
blink> ssh host
$ echo $LC_DEVICE
test
- Try over mosh:
blink> mosh host
$ echo $LC_DEVICE
no output
Expected behavior
For SendEnv variables to behave the same over mosh as they do on ssh
As a workaround, you can use --ssh option:
mosh --ssh="ssh -o SendEnv=LC_DEVICE" [email protected]
As a workaround, you can use --ssh option:
mosh --ssh="ssh -o SendEnv=LC_DEVICE" [email protected]
Can this be set in the Hosts config, in order to not have to type it manually for each host? I tried using it in the Host - name - Mosh - Command but this just gives an error.