Connect Docker Client to Remote Docker Host

This article will help to connect a Docker client to a remote Docker host Server. Prerequisites: Docker Server is installed on remote Docker...

This article will help to connect a Docker client to a remote Docker host Server.


Docker Server is installed on remote Docker host server 

Docker Client is installed on the client machine.

Docker Client must have ssh connectivity with the remote server

To Setup the ssh key

On Docker Client 

$ ssh-keygen

$ cat /<<user>>/.ssh/

copy these contents and got to remote server

On Docker Remote Server

append the content of client's ssh key to /<<user>>/.ssh/authorizedkeys

On Docker Client 

export DOCKER_HOST=ssh://<<user>>@<<RemoteIP>>

Now your client is connected to Remote Host Machine.

if you run docker commands it will connect to Remote Docker server.

How to disconnect to Remote server

$  unset DOCKER_HOST


  1. Not able to connect docker server from Docker client machine. Please suggest.

    Server - (private) (Public)
    Client - (Private) (Public)

    ubuntu@ip-172-31-24-217:~/.ssh$ export DOCKER_HOST=ssh://ubuntu@
    ubuntu@ip-172-31-24-217:~/.ssh$ docker --version

    Command 'docker' not found, but can be installed with:

    sudo snap install docker # version 19.03.11, or
    sudo apt install

    See 'snap info docker' for additional versions.

    ------ Checking Connection ----------
    ubuntu@ip-172-31-24-217:~/.ssh$ ssh ubuntu@
    Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 5.3.0-1035-aws x86_64)

    * Documentation:
    * Management:
    * Support:

    System information as of Tue Sep 29 19:35:51 UTC 2020

    System load: 0.0 Processes: 94
    Usage of /: 21.2% of 7.69GB Users logged in: 1
    Memory usage: 20% IP address for eth0:
    Swap usage: 0%

    36 packages can be updated.
    31 updates are security updates.

    New release '20.04.1 LTS' available.
    Run 'do-release-upgrade' to upgrade to it.

    Last login: Tue Sep 29 19:27:15 2020 from

    1. First you need to install docker on client system

  2. Secure Speech Recognition kiosk CenterThank you so much uploading this is very helpful to us. Great work!

  3. wonderful post. this is very well written and unique. Thank you for sharing this post here. keep sharing this in future. Managed Devops Solutions



Ansible,6,AWS,1,Azure DevOps,1,Containerization with docker,2,DevOps,2,Docker Quiz,1,Docker Swarm,1,DockerCompose,1,ELK,2,git,2,git quiz,1,Git Worksheet,1,Jira,3,Kubernetes,1,Kubernetes Quiz,5,SAST DAST Security Testing,1,SDLC Quiz,4,SonarQube,3,Splunk,2,vagrant kubernetes,1,YAML Basics,1,
DevOpsWorld: Connect Docker Client to Remote Docker Host
Connect Docker Client to Remote Docker Host
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content