I'm trying to copy a Nix closure to my server, using
nix-copy-closure user@server.com /nix/store/somelonghash-programname
but I get
bash: nix-store: command not found
error: cannot connect to 'user@server.com'
When I login to the server with ssh user@server.com I can run nix-store --version and it works.
Both machines are running Ubuntu 16.04.