Flux RSS des billets

DotMG's joblog

Work hard at whatever you do! (Ecc. 9. 10a)
ssh-copy-id to install public key in remote machines
Publié le 29 Mar 2013, 10:43 am dans linux

To be able to connect to a remote machine without the need to enter password, you use authentication by keyring, by copying your public key into the remote machine's list of authorized keys. ssh-copy-id is an interesting little utility that does just that.

ssh-copy-id root@my.new.server

This will ask once for the root password of my.new.server and install the public key of the user running this command into the remote machine's authorized keys. It's also possible to install another identity (for example, installing normal user public_key while logged-in as root on your local computer), by using the -i identity_file parameter.

Next time you login into the remote server, you won't be asked for a password

If you happen to encounter this error message: ssh-copy-id: ERROR: No identities found, it means that the current user doesn't have yet a public key. The solution is simple and one word: ssh-keygen

Les commentaires sont fermés pour ce billet.