|| FreeBSD General Commands Manual
copy public keys to a remote host
|| [ -lv][ -i keyfile][ -o option][ -p port][ user@] hostname
utility copies public keys to a remote host's
file (creating the file and directory, if required).
The following options are available:
Copy the public key contained in
file. This option can be specified multiple times and can be combined with the
-l option. If a private key is specified and a public key is found then the public key will be used.
Copy the keys currently held by
ssh-agent(1). This is the default if the
-i option was not specified.
Pass this option directly to
ssh(1). This option can be specified multiple times.
Connect to the specified port on the remote host instead of the default.
Pass -v to
The remaining arguments are a list of remote hosts to connect to, each one optionally qualified by a user name.
EXIT STATUS The
ssh-copy-id utility exits 0 on success, and >0 if an error occurs.
To send a specific key to multiple hosts:
$ ssh-copy-id -i /path/to/keyfile.pub user@host1 user@host2 user@host3
ssh-copy-id utility was written by
<eadler@FreeBSD.org> as a drop-in replacement for an existing utility included with OpenSSH.