SSH
by appleboy
Use the SSH plugin to execute commands on a remote server.
Example
kind: pipeline
name: default
steps:
- name: ssh
image: appleboy/drone-ssh
settings:
host:
- example1.com
- example2.com
username: ubuntu
password:
from_secret: ssh_password
port: 22
command_timeout: 2m
script:
- echo "Hello World"
Properties
host
stringrequiredHostname or IP address of the server.
Default: none
port
stringoptionalPort of the server.
Default: 22
username
stringoptionalaccount for target host user.
Default: none
password
stringoptionalPassword to login to the server.
Secret recommendedDefault: none
key
stringoptionalplain text of user private key
Secret recommendedDefault: none
key_path
stringoptionalPath to the private key to login to the server.
Default: none
envs
arrayoptionalcustom secrets which are made available in the script section.
Default: none
script
stringoptionalCommand to execute on the server.
Default: none
script_stop
booleanoptionalstop script after first failure.
Default: false
timeout
stringoptionalTimeout is the maximum amount of time for the ssh connection to establish.
Default: 30s
command_timeout
stringoptionalCommand timeout is the maximum amount of time for the execute commands
Default: 10m
proxy_host
stringoptionalProxy hostname or IP address.
Default: none
proxy_port
stringoptionalProxy port.
Default: none
proxy_username
stringoptionalProxy username.
Default: none
proxy_password
stringoptionalProxy password.
Secret recommendedDefault: none
proxy_key
stringoptionallain text of proxy private key.
Secret recommendedDefault: none
proxy_key_path
stringoptionalPath to the private key to login to the proxy.
Default: none