I'm looking for the simplest set of commands that you can run to add a public key to the authorized_keys files of the root account on a remote server.
We assume that the current user has access to the remote server, and he is also listed in the sudoers file.
Running a command twice should have no effect.
sorin source share