Repository navigation
ssh-env shell integration injects -o SetEnv ... and overrides user SetEnv from ~/.ssh/config
#10871
Issue DescriptionWhen Ghostty shell integration enables This breaks standard SSH env forwarding workflows (even when WorkaroundIf Ghostty is configured with Root Cause HypothesisGhostty's In OpenSSH, ImpactThis breaks legitimate OpenSSH workflows that rely on per-host Expected BehaviorEnvironment variables passed via Actual BehaviorEnvironment variables passed via Reproduction Steps
Ghostty LogsNo response Ghostty VersionOS Version InformationMacOS 26.2 (Linux only) Display ServerNone (Linux only) Desktop Environment/Window ManagerNo response Minimal Ghostty Configurationshell-integration-features = ssh-env |
Replies: 2 comments 1 reply
|
I don't think there is anything ghostty can do in this case then if passing args with -o SetEnv gets rid of the config file ones I don't think it should go and read the ssh config, the wrapper isn't meant to be perfect its mean to help in alot of situations |
|
Took a quick look and this is actually pretty easy to fix. Ghostty just has to use SendEnv instead of SetEnv, since SendEnv adds rather than replaces. Basically, replace ssh -o "SetEnv FOO=bar" user@hostwith FOO=bar ssh -o "SendEnv FOO" user@hostThe behavior you're reporting is definitely problematic, so this seems worthwhile to fix. |
Took a quick look and this is actually pretty easy to fix. Ghostty just has to use SendEnv instead of SetEnv, since SendEnv adds rather than replaces. Basically, replace
ssh -o "SetEnv FOO=bar" user@hostwith
FOO=bar ssh -o "SendEnv FOO" user@hostThe behavior you're reporting is definitely problematic, so this seems worthwhile to fix.