The SSH Upload build runner allows uploading files/directories via SSH (using SCP or SFTP protocols).
The settings common for all runners are described in Configuring Build Steps; this page details the SSH Deployer 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: for example, if you want to pass
%Y%m%d%H%M%S into the build, change it to
Optional Name of the build step displayed in the TeamCity UI.
ID for this build step, which must be unique across all steps of this configuration. Used in URLs, REST API, DSL, HTTP requests to the server, and configuration settings in the TeamCity Data Directory.
Enables you to modify the default build condition, and optionally add more build conditions.
SSH server location where the files will be uploaded, specified in the format:
Select a protocol to transfer data over SSH. The available options are: SCP and SFTP
Optional Port. Defaults to port 22.
Optional Timeout for the connection in seconds. Defaults to 0.
Select an authentication method:
Paths to sources
Specify the deployment sources as a newline- or comma-separated list of paths to files/directories.
The field supports Ant-style wildcard patterns (for example,
For example, consider the case where you need to add an SSH Upload build step to upload Java packages to an SSH server (on the
ssh.example.com host). Suppose you use the
jdoe account on the SSH server with the home directory
/jdoe, and the SSH server is configured to use SSH keys for authentication.
Follow the steps in Generated SSH Keys to generate a new SSH key pair in your project. Call the key pair
Copy the public key from the
Log in to the
jdoeaccount on your SSH server and follow the instructions from your SSH server provider to add the
PackageUploadKeypublic key to this account.
In your project's build configuration, go to the Build Steps page and click Add build step.
On the New Build Step page, select the SSH Upload runner.
On the New Build Step: SSH Upload page, fill in the fields, as follows:
Step name — Enter
Target — Enter
Authentication method — Select Uploaded key
Username — Enter
jdoe(the username for the account on the SSH server)
Select key — Select
PackageUploadKeyfrom the dropdown list
Paths to sources — Enter the following paths:
ch-simple/simple/target/*.jar => packages
Click Save to create the build step.