How to Use a Remote Docker Server to Speed Up Your Workflow

As I was following the tutorial on this topic (, I set up the droplet, installed Docker, and the ssh keys. However, when I type docker info, I get a server error:

(base) claudio@ubuntu:~$ docker info Client: Context: default Debug Mode: false Plugins: app: Docker App (Docker Inc., v0.9.1-beta3) buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)

Server: ERROR: error during connect: Get http://docker/v1.24/info: command [ssh -l claudio – docker system dial-stdio] has exited with exit status 255, please make sure the URL is valid, and Docker 18.09 or later is installed on the remote host: stderr=claudio@ Permission denied (publickey).

errors pretty printing info

I do not how to proceed… Would appreciate some help. Thank you

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


There is (at least) one step missing in this tutorial. You need to copy a file authorized_keys from root’s account to your user’s account on your docker-host. This file contains the ssh public keys. I guess your username is claudio, and your droplet’s IP is So,…

1. Ssh to your droplet as a root:

ssh root@

If you do not store your ssh private key in a default directory, which is ~/.ssh, you need to specify its location:

ssh root@ -i /your_unusual_ssh_dir_path/your_private_key

2. Create a directory for storing the authorized_keys file:

mkdir /home/claudio/.ssh

3. Copy the authorized_keys file to claudio’s home directory.

cp /root/.ssh/authorized_keys /home/claudio/.ssh/

4. Change an owner of the /home/claudio/.ssh directory and its content recursively:

chown -R claudio:claudio /home/claudio/.ssh

Exit ssh session and try to execute

docker info

1. If you do not store your ssh private key in a default directory, which is ~/.ssh, 
you need to specify its location in ~/.ssh/config file. 
The syntax would look like:

  User claudio
  IdentityFile /your_unusual_ssh_dir_path/your_private_key

2. You cannot use an ssh private key with a passphrase.

I hope it helps.