ssh-copy-id is a small script which copy your ssh public-key to a remote host; appending it to your remote authorized_keys.

$ ssh-copy-id root@
root@'s password:
Now try logging into the machine, with "ssh 'root@'", and check in:


to make sure we haven't added extra keys that you weren't expecting.

$ ssh root@
Last login: Mon Nov  3 18:46:32 2008 from
OpenBSD 4.4 (GENERIC) #1021: Tue Aug 12 17:16:55 MDT 2008

Welcome to OpenBSD: The proactively secure Unix-like operating system.
# cat .ssh/authorized_keys
ssh-dss [removed] /home/henry/.ssh/id_dsa

This script is not shipped with OpenBSD. But it’s part of the Portable OpenSSH. It is self-contained, you just need to download and drop it in your ~/bin directory.

Download it from