command/keys: refactor, restrict key operations to server nodes