title: How to connect to a target server via SSH with a key from a GitLab pipeline?
body: <p>I want to connect to a server via SSH with a public key when GitLab pipeline succeeds.</p>
  
  <p>As I see, I need to generate a key with ssh-keygen on GitLab side and add it to server where I want to connect.</p>
  
  <p>I can generate a key during the pipeline but as the public key is not added to the target server, it makes no sense.</p>
  
  <p>I suppose it's a common scenario to connect from a CI build to a remote SSH with a key.</p>
  
  <p>How can I make it work?</p>