this post was submitted on 23 Aug 2024
8 points (100.0% liked)

Tailscale

94 readers
1 users here now

A community for the Tailscale WireGuard-based VPN. https://tailscale.com/

founded 9 months ago
MODERATORS
8
submitted 3 months ago* (last edited 2 months ago) by [email protected] to c/tailscale
 

Hey all!

I'm trying to ssh into my tailnet-hosted (through tailscale serve) gogs instance and I can't seem to figure out how. Has anyone tried doing this? Will I need to add a user to the sidecar container and add a shim like they do in the regular gogs setup? I appreciate any insight.

Edit: Modified title for clarity

top 5 comments
sorted by: hot top controversial new old
[–] DevKay 2 points 3 months ago (2 children)

Not familiar with gogs, but SSHing into a container is usually not necessary. Should be able to SSH into the host and run docker exec -it commands instead, which is much simpler. If you absolutely have to SSH into the container it should be doable by exposing port 22 on the service and coming up as a tailnet ssh node

[–] moonpiedumplings 2 points 3 months ago

Gogs is a git forge server (it was forked into gitea, which was then forked into forgejo), and OP is asking about setting up git over ssh, rather than using ssh to administrate.

[–] [email protected] 2 points 3 months ago (1 children)

Ope, I should have mentioned that gogs is a git server so by ssh access I mean for git stuff like clone and push.

The non-tailscale install relies on a shim script (which does use docker exec) and softlinking the host git user's .ssh file to inside the container, but that won't work going through the sidecar. The only way forward I can see is building my own tailscale sidecar with a git user and moving the shim script to it but I wanted to see if the community had any insight before I committed to that.

[–] DevKay 1 points 2 months ago (1 children)

Oh for sure wait for someone more knowledgeable to respond then/do your own thing. I've not yet gotten much into anything with git since I'm pretty new to all of this. Sorry for the out of place advice!

[–] [email protected] 2 points 2 months ago

No worries! I'm just getting into both of these and regretting not doing it sooner, reconfiguring your workflow is a pain lol.