blink icon indicating copy to clipboard operation
blink copied to clipboard

Mosh appears to drop extra environment variables

Open rrgeorge opened this issue 2 years ago • 2 comments

Checklist

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:

  1. Set SendEnv in .ssh/config (or host SSH config):
SendEnv LC_DEVICE
  1. Set env in host .blink/profile:
LC_DEVICE=test
  1. Confirm its set:
blink> echo $LC_DEVICE
test
  1. Confirm its set over ssh:
blink> ssh host
$ echo $LC_DEVICE
test
  1. 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

rrgeorge avatar Feb 22 '24 17:02 rrgeorge

As a workaround, you can use --ssh option: mosh --ssh="ssh -o SendEnv=LC_DEVICE" [email protected]

skliarie avatar Dec 01 '24 08:12 skliarie

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.

jaclu avatar May 26 '25 10:05 jaclu