doctl compute ssh

Go to Navigation

Usage

doctl compute ssh <droplet-id|name> [flags]

Description

Access a Droplet using SSH by providing its ID or name.

You may specify the user to login with by passing the --ssh-user flag. To access the Droplet on a non-default port, use the --ssh-port flag. By default, the connection will be made to the Droplet’s public IP address. In order access it using its private IP address, use the --ssh-private-ip flag.

Flags

OptionDescription
--help, -hHelp for this command
--ssh-agent-forwardingEnable SSH agent forwarding
Default: false
--ssh-commandCommand to execute on Droplet
--ssh-key-pathPath to SSH private key
--ssh-portThe remote port sshd is running on
Default: 22
--ssh-private-ipSSH to Droplet’s private IP address
Default: false
--ssh-userSSH user for connection
Default: root
CommandDescription
doctl computeDisplay commands that manage infrastructure

Global Flags

OptionDescription
--access-token, -tAPI V2 access token
--api-url, -uOverride default API endpoint
--config, -cSpecify a custom config file
Default:
  • macOS: ${HOME}/Library/Application Support/doctl/config.yaml
  • Linux: ${XDG_CONFIG_HOME}/doctl/config.yaml
  • Windows: %APPDATA%\doctl\config.yaml
--contextSpecify a custom authentication context name
--output, -oDesired output format [text|json]
Default: text
--traceShow a log of network activity while performing a command
Default: false
--verbose, -vEnable verbose output
Default: false