Proxy Jump

Tutorial on proxy jump

CI Workflow

It is very tricky to make SSH connections in CI workflows like GitHub Actions and Gitlab CI. I have suffered from both during the past few month: each spent me about a day to find a magic trick to make it work. The difficulty comes from accessing private servers from a docker machine. You need to setup the private and public keys properly and overcome multiple issues like Host key verification failed when you tries to access to a machine for the first time, proxy jump through another server, etc.

For example, I need to turn off ssh host key checking for the first time access on the university server and use a proxy jump to acccess data from the actual machine behind:

ssh -o StrictHostKeyChecking=no
ssh -o StrictHostKeyChecking=no -J
scp -r -o 'ProxyCommand ssh -W %h:%p' \ testpackage/tests/

Thanks to all the people online sharing their experience on all kinds of issues!