sshs icon indicating copy to clipboard operation
sshs copied to clipboard

SSH config parse error with global parameters

Open Shr3ps opened this issue 2 years ago • 5 comments

 %  sshs                                                                                                                         
2022/06/14 17:48:46 /home/shreps/.ssh/config:0: config variable before Host variable
%  head .ssh/config                                                                                                                                                                              
AddressFamily inet

Host bitbucket.org
    Hostname bitbucket.org
    User git
    ControlMaster no

Host github.com
    StrictHostKeyChecking no
    User git

sshs seems not understand / don't ignore the AddressFamily parameter in my ssh config file.

Shr3ps avatar Jun 14 '22 15:06 Shr3ps

I don't believe allowed top-level directives contains anything else than Host or Include. Are you sure it's a valid configuration ?

quantumsheep avatar Jun 14 '22 16:06 quantumsheep

According to man: http://man.openbsd.org/OpenBSD-current/man5/ssh_config.5#AddressFamily It seems legit, and never had problem using this (it forces to use IPv4 instead of IPv6)

Shr3ps avatar Jun 14 '22 17:06 Shr3ps

Agree with Sh3ps, I have the directive : ForwardAgent yes And same error :)

sgaunet avatar Jun 14 '22 19:06 sgaunet

I had the same issue as mentioned here and had to comment the global directive ServerAliveInterval 10 I defined in my ~/.ssh/config file to make it work.

Is there some workaround to make those global config elements to be taken into account in another way or is it a bug/limitation in the current design of sshs ?

Thanks for this great tool ✨ otherwise, happy I could find it from korben's website ;)

antoine-em avatar Jun 17 '22 06:06 antoine-em

It needs to be implemented in mikkeloscar/sshconfig. As things continues it seems more clever to rewrite it entirely as it doesn't support a lot of features.

quantumsheep avatar Jun 17 '22 08:06 quantumsheep

Hey! There is now a custom ssh config parser in 4.0.0, give it a try!

quantumsheep avatar Feb 21 '24 21:02 quantumsheep