Well, these kind of things make me hungry.
The ssh alias can not understand the tilde ~ character.
I have a line similar to this in ~/.wp-cli/config.yml:
ssh: dh-k1
path: ~/sites/example.com/www
resulting error:
Error: This does not seem to be a WordPress installation.
when I change the config to
ssh: dh-k1
path: /home/user/sites/example.com/www
everything works.