Sometimes you may need to use SSH to execute commands in the remote server from your Pipeline or to deploy your app in the private cloud.
If you need to connect to remote host from the GitLab Pipeline you need to create SSH key pair on the remote host, copy private key into CICD variable in Git and add public key on the remote host to the ~/.ssh/authorized_keys
ssh-keygen -t ed25519 cat id_ed25519.pub >> authorized_keys # Copy Private Key id_ed25519 to GitLab CICD Variable