docker context create remote --docker "host=ssh://hostname" docker context use remote
If the Docker daemon is not running on the remote host, you might see this error message:
Cannot connect to the Docker daemon at http://docker.example.com. Is the docker daemon running?
docker.example.com host is of course nonsense.
The solution: Start the Docker daemon on the remote host and it should work.