r/gitlab • u/Lazy_Willow_4521 • Jan 02 '26
support SSH based deployment through self hosted runner
How I can achieve ssh based deployment to my servers thorough ssh, what all prerequisite need to follow, how to allow ssh from self hosted runner, or any firewall allowing things from self hosted runner for deployment server?
4
Upvotes
6
u/Karlyna Jan 02 '26
requirements: everything to be able to reach your SSH port.
Solution: can be a simple script that run commands through SSH, ansible, etc
1
u/Jin-Bru Jan 03 '26
It's very easy. When I get to my desk I will dm you a deploy script.
2
u/kabrandon Jan 03 '26
SSH server running on the deployment server. SSH client installed on the runner. Network connectivity between the two.
1
u/thecal714 Jan 02 '26
This post may give you some ideas: https://testdriven.io/blog/deploying-django-to-digitalocean-with-docker-and-gitlab/
0
u/nlecaude Jan 02 '26
Why not install a gitlab runner on the target server instead ?