title: JetBrains Space. docker-compose with -H flag to deploy on remote server
body: <p>I am trying to create CI pipeline using JetBrains Space. I have a problem with SSH authorization. Totally confused by SSH public/private keys.</p>
  <p>There are two steps:</p>
  <ol>
  <li>building and pushing an image</li>
  </ol>
  <pre><code>docker {
          beforeBuildScript {
              content = &quot;&quot;&quot;
                  export BRANCH=${'$'}(echo ${'$'}JB_SPACE_GIT_BRANCH | cut -d'/' -f 3)
              &quot;&quot;&quot;
          }
          build {
              file = &quot;./Dockerfile&quot;
          }
          push(&quot;my image&quot;) {
              tag = &quot;version-0.\$JB_SPACE_EXECUTION_NUMBER-\$BRANCH&quot;
          }
      }
  </code></pre>
  <ol start="2">
  <li>Call <code>docker-compose up -d</code> to deploy on remote server.</li>
  </ol>
  <p>There are two servers.</p>
  <ol>
  <li>My virtual machine (Ubuntu), where I want services are been started using docker.</li>
  <li>Remote JetBrains cloud CI machine.</li>
  </ol>
  <p>I wanna use SSH key, ED25519 or RSA. I made next steps on Ubuntu server:</p>
  <ul>
  <li>Have created a ci_user</li>
  <li>Have called ssh-keygen</li>
  <li>Have added public key to <code>home/ci_user/.ssh/authorized_keys</code></li>
  </ul>
  <p>On cloud JetBrains machine:</p>
  <ul>
  <li><strong>First of all I am root user here, not ci_user, so I am trying to create home folder for ci_user</strong></li>
  <li>Have added private key during CI step to <strong>/home/ci_user/.ssh/id_ed25519</strong></li>
  </ul>
  <p>So my second step is:</p>
  <pre><code> container(displayName = &quot;docker compose up&quot;, image = &quot;docker/compose:latest&quot;) {
          env[&quot;DOCKER_HOST&quot;] = Secrets(&quot;dev_server&quot;)
          env[&quot;CI_PSWRD&quot;] = Secrets(&quot;ci_password&quot;)
          env[&quot;CI_USER&quot;] = Secrets(&quot;ci_user&quot;)
          env[&quot;PRIVATE_SSH_KEY&quot;] = Secrets(&quot;private_key&quot;)
          shellScript {
              content = &quot;&quot;&quot;
                  mkdir /home/ci_user/
                  mkdir /home/ci_user/.ssh
                  touch /home/ci_user/.ssh/id_ed25519
                  chmod 700 /home/ci_user/.ssh
                  chmod 600 /home/ci_user/.ssh/id_ed25519
                  echo ${'$'}PRIVATE_SSH_KEY &gt;&gt; /home/ci_user/.ssh/id_ed25519
                  export DOCKER_HOST=ssh://${'$'}CI_USER@${'$'}DOCKER_HOST
                  docker-compose up -d
              &quot;&quot;&quot;
          }
      }
  </code></pre>
  <p>I have next error:</p>
  <pre><code>[13] Failed to execute script docker-compose
  /tmp/_MEInmipco/paramiko/client.py:837: UserWarning: Unknown ssh-ed25519 host key for xxx.xxx.xxx.xxx : b'81ab950dfe8e8eac56d9df1bce6ee82b'
  Traceback (most recent call last):
    File &quot;bin/docker-compose&quot;, line 6, in &lt;module&gt;
    File &quot;compose/cli/main.py&quot;, line 72, in main
    File &quot;compose/cli/main.py&quot;, line 125, in perform_command
    File &quot;compose/cli/command.py&quot;, line 76, in project_from_options
    File &quot;compose/cli/command.py&quot;, line 142, in get_project
    File &quot;compose/cli/docker_client.py&quot;, line 47, in get_client
    File &quot;compose/cli/docker_client.py&quot;, line 174, in docker_client
    File &quot;site-packages/docker/api/client.py&quot;, line 166, in __init__
    File &quot;site-packages/docker/transport/sshconn.py&quot;, line 111, in __init__
    File &quot;site-packages/docker/transport/sshconn.py&quot;, line 119, in _connect
    File &quot;site-packages/paramiko/client.py&quot;, line 446, in connect
    File &quot;site-packages/paramiko/client.py&quot;, line 765, in _auth
  paramiko.ssh_exception.SSHException: No authentication methods available
  </code></pre>
  <p>What am I doing wrong?</p>