How to copy the public ssh keys from other users to to their ~/.ssh/authorized_keys on a remote server?
I'm aware of the 'ssh-copy-id' command, but I assume it only work if the user has currently normal access via their password on the remote computer. I could copy the files with SCP to my own directory, then login and copy the the files to the users directory, but I would like to have a method that does not involve extra handling on the remote server.
- Only ssh password-less-login is allowed (None of the users are allowed to login with password
- Currently one user (me) has password-less-login access and has 'sudo' rights
- Assume other users don't have a '~/.ssh' directory
local client: MacOs X
remote server: Debian