<commit_before>---
layout: docs
title: Accessing Linux build worker via SSH
---

# Accessing Linux build worker via SSH

AppVeyor starts every build on clean dedicated build worker VM. If you need to troubleshoot a broken build you can access running Linux VM via SSH with a full "root" access.

To enable SSH access during the build you should configure two environment variables (either in `appveyor.yml` or on **Environment** tab of project settings):

* `APPVEYOR_SSH_KEY` - public portion of your SSH key, for example `ssh-rsa AAAAB3NzaC1yc2EAAAABJQ...6TMCNw== rsa-key-20180328`. This is mandatory variable.
* `APPVEYOR_SSH_BLOCK` - if set to `true` SSH connection details will be displayed and the build will be blocked until `~/build.lock` is deleted; otherwise SSH details will be displayed and the build will continue. This variable is optional with default value `false`.

> Despite the fact `appveyor.yml` settings takes over the UI environment variables are handled differently, i.e. environment variables defined on UI are getting merged with those one defined in `appveyor.yml`.

Add the following command at the place where SSH access should be enabled:

    curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -

For example, to enable SSH access at the very beginning of the build, during `init` phase:

```yaml<commit_msg>Remove key name<commit_after>---
layout: docs
title: Accessing Linux build worker via SSH
---

# Accessing Linux build worker via SSH

AppVeyor starts every build on clean dedicated build worker VM. If you need to troubleshoot a broken build you can access running Linux VM via SSH with a full "root" access.

To enable SSH access during the build you should configure two environment variables (either in `appveyor.yml` or on **Environment** tab of project settings):

* `APPVEYOR_SSH_KEY` - public portion of your SSH key, for example `ssh-rsa AAAAB3NzaC1yc2EAAAABJQ...6TMCNw==`. This is mandatory variable.
* `APPVEYOR_SSH_BLOCK` - if set to `true` SSH connection details will be displayed and the build will be blocked until `~/build.lock` is deleted; otherwise SSH details will be displayed and the build will continue. This variable is optional with default value `false`.

> Despite the fact `appveyor.yml` settings takes over the UI environment variables are handled differently, i.e. environment variables defined on UI are getting merged with those one defined in `appveyor.yml`.

Add the following command at the place where SSH access should be enabled:

    curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -

For example, to enable SSH access at the very beginning of the build, during `init` phase:

```yaml
{'fraction_non_alphanumeric': 0.06964091403699674, 'fraction_numerical': 0.005803409503083061, 'mean_word_length': 4.450592885375494, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2257342', 'n_tokens_mistral': 784, 'n_tokens_neox': 738, 'n_words': 380}