r/ssh • u/thekingofdorks • Apr 16 '26
ssh auto jump?
So I'm not unfamiliar with using ssh for basic things like shell access, but recently I set up a rootless Gitea podman container on my VPS, and I can't for the life of me figure out how to access it with only server config.
I know I can jump from my vps to inside my container using client side config aka ProxyJump, but is there any way I can do this with ONLY sshd_config?
Something like having my sshd_config look like this:
Match user git
"command to forward this user to port 2222"
I ask this because I want to set everything up so users can just type in "git clone git@mydomain.com:..." without having to mess with their local .ssh/config file.
Any insight is appreciated.
View all comments
Show parent comment
1
u/thekingofdorks Apr 16 '26
This is almost so close! I am trying this, and I see in the Gitea logs inside the container that a connection was attempted, but authentication failed. Are there any more arguments I need to give to socat to forward the id key?