SSH connection to AWS from Gitlab CI

Published: 12 March 2020
on channel: Valentin Despa
26k
428

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.

Resources:

This is the .gitlab-ci.yml as seen in the video:


Using SSH keys with GitLab CI/CD -


ssh-agent -

ssh-add -
___

// GitLab CI/CD ONLINE COURSE

Want to learn more about CI/CD pipelines? Check my GitLab CI online course.

Get it at a special price and help support this YouTube channel:


___

// I HAVE A QUESTION!

I do my best to answer all comments here on YouTube but I cannot make any guarantees.

___

// I HAVE A VIDEO IDEA

Do you want me to create a video on a specific topic? Just fill out the form below:



___

// P L A Y L I S T S

▸ Learn Gitlab CI |

___

// F R E E R E S O U R C E S

▸▸▸ Official Gitlab CI documentation


▸▸▸ Subscribe to the "Testing and automation with Valentine" newsletter for bi-weekly tutorials, tips, and news from the industry.


___


// YOUR SUPPORT ON PATREON MATTERS

If you enjoy this content, help me create more like this. Consider supporting me on Patreon.


___

// IMPRINT



---


Watch video SSH connection to AWS from Gitlab CI online without registration, duration 07 minute 01 second in high hd quality. This video was added by user Valentin Despa 12 March 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 26 thousand once and liked it 428 people.