The SCP plugin copy files and artifacts to target host machine via SSH.

Example

kind: pipeline
name: default

steps:
- name: scp files
image: appleboy/drone-scp
settings:
  host: example.com
  username: foo
  password: bar
  port: 22
  target: /var/www/deploy/${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}
  source: release.tar.gz

Properties

  • host

    stringrequired

    Target host machine.

    Default: none

  • port

    numberoptional

    Target host machine port.

    Default: 22

  • username

    stringrequired

    Target host machine username.

    Default: none

  • password

    stringrequired

    Target host machine password.

    Secret recommended

    Default: none

  • key

    stringoptional

    Target host machine private key.

    Secret recommended

    Default: none

  • passphrase

    stringoptional

    Target host machine private key passphrase.

    Secret recommended

    Default: none

  • target

    stringrequired

    Target host machine path.

    Default: none

  • source

    stringrequired

    Source file path.

    Default: none

  • rm

    booleanoptional

    Remove source file after copy.

    Default: false

  • timeout

    numberoptional

    Timeout in seconds.

    Default: 30

  • command_timeout

    numberoptional

    Timeout in minutes.

    Default: 10

  • strip_components

    numberoptional

    Strip components from the target path.

    Default: 0

  • tar_tmp_path

    stringoptional

    Temporary path for tar.

    Default: none

  • tar_exec

    stringoptional

    Tar command.

    Default: none

  • overwrite

    booleanoptional

    Overwrite target file if exists.

    Default: false

  • proxy_host

    stringoptional

    Proxy host.

    Default: none

  • proxy_port

    numberoptional

    Proxy port.

    Default: 0

  • proxy_username

    stringoptional

    Proxy username.

    Default: none

  • proxy_password

    stringoptional

    Proxy password.

    Secret recommended

    Default: none

  • proxy_key

    stringoptional

    Proxy private key.

    Secret recommended

    Default: none

  • proxy_key_path

    stringoptional

    Proxy private key path.

    Default: none

  • proxy_key_passphrase

    stringoptional

    Proxy private key passphrase.

    Secret recommended

    Default: none