antoniomika / sish

HTTP(S)/WS(S)/TCP Tunnels to localhost using only SSH.
https://ssi.sh
MIT License
3.96k stars 302 forks source link

Restricting custom domains to specific SSH keys #321

Open wdhdev opened 1 week ago

wdhdev commented 1 week ago

I am having some trouble setting up custom domains and restricting them to specific SSH keys.

For context this is my setup:

In my config file I have the following:

bind-any-host: false
bind-hosts: t.wdh.gg

Now, this config works and I can setup subdomains on t.wdh.gg like tunnel123.t.wdh.gg however even though I have a TXT record set at _sish.t.wdh.gg with the content:

SHA256:yQ2G5ra7npl6ROKw3BJQWULROIG37u14aMfbfKoWFqQ

Even though that TXT record is in place, anyone regardless if they are using that SSH key are able to use t.wdh.gg subdomains even though it should be restricted to that specific key.

I have tried the following, none of which worked:

Please let me know how I can setup custom domains and restrict them using TXT records to specific SSH keys. Thanks!

wdhdev commented 5 days ago

Hey @antoniomika, no rush, but are you able to look into this? Thanks 😄