quantumsheep / sshs

Terminal user interface for SSH
MIT License
910 stars 27 forks source link

Support for Include #27

Closed jygastaud closed 7 months ago

jygastaud commented 2 years ago

Thanks for your tool.

It would be really good it can support Include (eg Include conf.d/*) pattern from ~/.ssh/config.

quantumsheep commented 2 years ago

It's supposed to be already included, I'm using it locally. It doesn't work on your side?

jygastaud commented 2 years ago

@quantumsheep Thanks for your quick answer. You're right, it almost works.

In fact, it was an include automatically added by platform.sh CLI that make the tool fails :/

That include looks like

Host *.platform.sh
  Include /Users/XXXX/.platformsh/ssh/*.config
quantumsheep commented 2 years ago

I didn't know Include directives could work inside Host directives. sshs is using sshconfig, I implemented it limiting usage inside of Host directives (https://github.com/mikkeloscar/sshconfig/blob/9ddb34f89ae36bf3ab5662bcd715458a9c93a16e/parser.go#L149).

I'll try to fix this this week :)

Gounick commented 2 years ago

Hello, I have the same usage and this error:

$ sshs
2022/06/15 09:08:14 include not allowed in Host block
$ cat ~/.ssh/config
Host *
  ForwardAgent yes

Include ~/.ssh/config.d/*.txt
$ sshs --version
sshs version 3.2.0
$ ssh -V
OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f  31 Mar 2020
quantumsheep commented 7 months ago

Hey! Include is now implemented in 4.0.0