In this tutorial, I will show you how to establish an SSH connection from a Gitlab CI server to another server. It is not necessary for the other server to have the Gitlab CI runner installed.

The ssh command includes the StrictHostKeyChecking flag. If this flag is set to no, the ssh client will automatically add host keys to the ~/.ssh/known_hosts file and will accept to connect to hosts whose host key has changed. This is why we create the .ssh folder and set the right permission to it.

Establishing an SSH connection from GitLab CI to AWS can be useful for a variety of tasks, such as deploying your application to an EC2 instance, or managing your AWS resources using CLI commands.

In this video, I'll show you how to establish an SSH connection from GitLab CI to AWS, step-by-step. I'll also cover some common use cases for this feature.

#gitlab #aws 

How to connect to AWS from GitLab CI using SSH
1.05 GEEK