Using the SCP task in Bamboo

Still need help?

The Atlassian Community is here for you.

Ask the community

You can use the Bamboo SCP task to upload files from Bamboo directly to a remote server as part of a Bamboo job. The SCP task is able to copy multiple files and preserves the directory structure for the copied files.

See Configuring a deployment task for an overview of Bamboo deployment tasks.

To configure an SCP task:

  1. Navigate to the Tasks configuration tab for the job (this will be the default job if creating a new plan).
  2. Select the name of an existing SCP task, or click Add task > SCP Task to create a new task.
  3. Complete the following settings:

    SettingDescription
    Task description Helps you identify the purpose of the task.
    Disable this taskCheck, or clear, to selectively run this task.
    Add condition to taskMake the task run only when a certain condition is met. You can find conditions on Atlassian Marketplace or implement your own.  
    HostsComma-separated list of hostnames or IP addresses of the remote servers to which the files will be copied.
    Verify remote host fingerprint on connectEnter the host fingerprint to be verified. See below for more details.
    PortThe port number of the remote host that is used for the SSH connection. The default value is 22.
    UsernameThe username to use to connect to the remote host.
    Authentication TypePassword – the password associated with Username.
    Key without passphrase – browse to the SSH private key with which to authenticate with the remote host.
    Key with passphrase – browse to the SSH private key, and supply the passphrase, to use to authenticate with the remote host.
    Local PathThe local path (relative to the Bamboo working directory) to the files you want to copy. Use commas to separate files and directories. You can also use Ant-style pattern matching to include multiple files, such as **/target/*.jar.
    Remote PathThe path to the destination directory on the remote server.
  4. Select Save.

Host fingerprint

You can determine the fingerprint for a host by running:

ssh-keygen -l -F <HOSTNAME>

The fingerprint is the part of the response shown in the screenshot below:


Last modified on Aug 24, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.