github.com/nilium/gitlab-runner@v12.5.0+incompatible/docs/executors/ssh.md (about)

     1  # SSH
     2  
     3  NOTE: **Note:**
     4  The SSH executor supports only scripts generated in Bash and the caching feature
     5  is currently not supported.
     6  
     7  This is a simple executor that allows you to execute builds on a remote machine
     8  by executing commands over SSH.
     9  
    10  NOTE: **Note:**
    11  GitLab Runner will use the `git lfs` command if [Git LFS](https://git-lfs.github.com) is installed on the remote machine.
    12  Ensure Git LFS is up-to-date on any remote systems where GitLab Runner will run using SSH executor.
    13  
    14  ## Overview
    15  
    16  To use the SSH executor you need to specify `executor = "ssh"` under the
    17  [`[runners.ssh]`][runners-ssh] section. For example:
    18  
    19  ```toml
    20  [[runners]]
    21    executor = "ssh"
    22    [runners.ssh]
    23      host = "example.com"
    24      port = "22"
    25      user = "root"
    26      password = "password"
    27      identity_file = "/path/to/identity/file"
    28  ```
    29  
    30  You can use `password` or `identity_file` or both to authenticate against the
    31  server. GitLab Runner doesn't implicitly read `identity_file` from
    32  `/home/user/.ssh/id_(rsa|dsa|ecdsa)`. The `identity_file` needs to be
    33  explicitly specified.
    34  
    35  The project's source is checked out to:
    36  `~/builds/<short-token>/<concurrent-id>/<namespace>/<project-name>`.
    37  
    38  Where:
    39  
    40  - `<short-token>` is a shortened version of the Runner's token (first 8 letters)
    41  - `<concurrent-id>` is a unique number, identifying the local job ID on the
    42    particular Runner in context of the project
    43  - `<namespace>` is the namespace where the project is stored on GitLab
    44  - `<project-name>` is the name of the project as it is stored on GitLab
    45  
    46  To overwrite the `~/builds` directory, specify the `builds_dir` options under
    47  `[[runners]]` section in [`config.toml`][toml].
    48  
    49  If you want to upload job artifacts, install `gitlab-runner` on the host you are
    50  connecting to via SSH.
    51  
    52  ## Security
    53  
    54  The SSH executor is susceptible to MITM attacks (man-in-the-middle), because of
    55  the missing `StrictHostKeyChecking` option. This will be fixed in one of the
    56  future releases.
    57  
    58  [runners-ssh]: ../configuration/advanced-configuration.md#the-runnersssh-section
    59  [toml]: ../configuration/advanced-configuration.md