From the course: AWS DevOps: Continuous Docker Deployment to AWS Fargate from GitLab

Unlock the full course today

Join today to access over 24,900 courses taught by industry experts.

Change the SSH Port

Change the SSH Port

- [Narrator] Before we start up the Gitlab docker container we need to move SSH from its default port of 22 to another unused port, like 24922. This is because when the docker container starts up it wants to bind to port 22 on the host instance because this is how our users who are going to clone their repositories via SSH are going to access the Gitlab container. However, the host SSH server is already running on port 22. So we need to move it. In the EC2 console, select the Gitlab instance and under the description tab, go down and click on the security group attached to the Gitlab instance. On the inbound tab, click edit, click Add Rule, select Custom TCP rule. And for the port range, type in 24922. And for the source, set this to My IP. This is so that only you can access the docker host server via SSH. Now, if your local computer's IP address changes, you'll need to edit the security group again and give it your new IP. Click save. Now switch back to your SSH session with the…

Contents