ssh-copy-id can be used to install your public key in a remote machine's
authorized_keys. Could the same command be used to install other users' public keys, if you have
Update: both local and remote are using Ubuntu 12.04.
Update 2: describing the procedure of creating a new user account and adding public key
- (remote) Create a new user account, and set it to user public key access only.
- (local) Generate a public key for the new user account (ssh-keygen).
- Normally I do is to create the directory and file
.ssh/authorized_keyson the remote server, then copy and paste the public key generated locally to the new user's account. What I am looking for is that if I can use
ssh-copy-idto install this newly created user's public key directly into the ssh directory. Just to save a couple more commands.