Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fail with config:32: config variable before Host variable #57

Open
simkimsia opened this issue Oct 6, 2023 · 5 comments
Open

fail with config:32: config variable before Host variable #57

simkimsia opened this issue Oct 6, 2023 · 5 comments

Comments

@simkimsia
Copy link

similar to #1

Include ~/.orbstack/ssh/config

ControlMaster auto
ControlPath /tmp/%r@%h:%p


Host ssh-cpopv2
  HostName abc..
@jingfelix
Copy link

I met the same problem with

Include ~/.orbstack/ssh/config

ForwardX11 yes

I guess sshs does not support ForwardX11 yes.

@userwiths
Copy link

I believe this happens because of the currently used parser, more precisely here.

I though about opening an issue, but it looks like it is advised in the OpenSSH specification to put the Host's first and other parameters after them.
image

Maybe, @simkimsia you could try something like

Host ssh-cpopv2
  HostName abc..
  
Include ~/.orbstack/ssh/config

ControlMaster auto
ControlPath /tmp/%r@%h:%p

and tell us if thats the case.

NOTE: my config is looking like that, with the Include on top, and works correctly.

Include ~/.orbstack/ssh/config

Host ssh-cpopv2
  HostName abc..
  
ControlMaster auto
ControlPath /tmp/%r@%h:%p

As for the ForwardX11 if I put it at the very end of my config, it works correctly. Hope that solves your issue @jingfelix

Hope this helps.

@jingfelix
Copy link

@userwiths It works, thanks so much!

@mblauser
Copy link

mblauser commented Jun 4, 2024

This has plagued me for years while using sshs until recently discovering this unexpected config behavior.

The parser as currently implemented treats a "Host *" section at the top of the config as immutable values, unchanged by more specific host entries. My initial understanding was that more specific host entries would override the "Host *" section. What functions best is listing the "Host *" last, providing fallback defaults.

@quantumsheep
Copy link
Owner

Hey! Since sshs now has an homemade parser, is the issue fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants