if you have an ssh access with account root on machine n0, and if the docker daemon is running on this same machine then the command you use will definitely work.
On macOS this is different as the docker daemon is running in a xhyve virtual machine.
I hope this help.
thanks for your comment. The creation of the Vagrant machine is justto illustrate how to set this up for a remote host.
You are right, if you are on a Linux machine, you can send docker commands to the docker daemon via ssh with the following command.
DOCKER_HOST=ssh://localhost docker info