You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
Go to the latest TeamCity documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

Skip to end of metadata
Go to start of metadata

SSH Exec enables TeamCity to execute arbitrary remote commands using SSH.

The settings common for all runners are described on a separate page; this page details the SSH Exec runner settings.


The fields below support parameter references: any text between percentage signs (%) is considered a reference to a property by TeamCity. To prevent TeamCity from treating the text in the percentage signs as reference to a property, use two percentage signs to escape them: e.g. if you want to pass "%Y%m%d%H%M%S" into the build, change it to "%%Y%%m%%d%%H%%M%%S"

Deployment Target

Target should point to an SSH server location. Enter hostname or IP address.

PortOptional. By default, port 22 is used.
Use ptyOptional. By default, a pty will not be allocated
Deployment CredentialsThe settings in this section will vary depending on the selected authentication method.
Authentication method

Select an SSH authentication method.

  • Select an authentication method.

    • Uploaded key  uses the key(s) uploaded to the project. See SSH Keys Management for details.
    • Default private key will try to perform private key authentication using the ~/.ssh/config settings. If no settings file exists, will try to use the ~/.ssh/rsa_pub public key file. No passphrases should be set.
    • Custom private key will try to perform private key authentication using the given public key file with given passphrase
    • Password - simple password authentication.
    • SSH-Agent - use ssh-agent for authentication, the SSH-Agent build feature must be enabled.

Limited security note


The current secure connection implementation accepts any certificate provided by the remote host. No trust checks are performed!

SSH Commands
Commands:Specify a new-line delimited set of commands that will be executed in the remote shell. The remote shell will be started in the home directory of an authenticated user. The shell output will be available in the TeamCity build log.



















  • No labels