12beb7085SEitan Adler.\"- 22beb7085SEitan Adler.\" Copyright (c) 2012 Eitan Adler 32beb7085SEitan Adler.\" 42beb7085SEitan Adler.\" Redistribution and use in source and binary forms, with or without 52beb7085SEitan Adler.\" modification, are permitted provided that the following conditions 62beb7085SEitan Adler.\" are met: 72beb7085SEitan Adler.\" 1. Redistributions of source code must retain the above copyright 82beb7085SEitan Adler.\" notice, this list of conditions and the following disclaimer. 92beb7085SEitan Adler.\" 2. Redistributions in binary form must reproduce the above copyright 102beb7085SEitan Adler.\" notice, this list of conditions and the following disclaimer in the 112beb7085SEitan Adler.\" documentation and/or other materials provided with the distribution. 122beb7085SEitan Adler.\" 132beb7085SEitan Adler.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 142beb7085SEitan Adler.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 152beb7085SEitan Adler.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 162beb7085SEitan Adler.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 172beb7085SEitan Adler.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 182beb7085SEitan Adler.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 192beb7085SEitan Adler.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 202beb7085SEitan Adler.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 212beb7085SEitan Adler.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 222beb7085SEitan Adler.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 232beb7085SEitan Adler.\" SUCH DAMAGE. 242beb7085SEitan Adler.\" 250d7fff32SJoel Dahl.Dd February 28, 2014 262beb7085SEitan Adler.Dt SSH-COPY-ID 1 272beb7085SEitan Adler.Os 282beb7085SEitan Adler.Sh NAME 292beb7085SEitan Adler.Nm ssh-copy-id 302beb7085SEitan Adler.Nd copy public keys to a remote host 312beb7085SEitan Adler.Sh SYNOPSIS 322beb7085SEitan Adler.Nm 33df54ea80SEitan Adler.Op Fl lv 342beb7085SEitan Adler.Op Fl i Ar keyfile 352beb7085SEitan Adler.Op Fl o Ar option 362beb7085SEitan Adler.Op Fl p Ar port 372beb7085SEitan Adler.Oo Ar user Ns @ Oc Ns Ar hostname 382beb7085SEitan Adler.Sh DESCRIPTION 392beb7085SEitan AdlerThe 402beb7085SEitan Adler.Nm 412beb7085SEitan Adlerutility copies public keys to a remote host's 42a018185aSEitan Adler.Pa ~/.ssh/authorized_keys 43a018185aSEitan Adlerfile (creating the file and directory, if required). 442beb7085SEitan Adler.Pp 452beb7085SEitan AdlerThe following options are available: 462beb7085SEitan Adler.Bl -tag -width indent 472beb7085SEitan Adler.It Fl i Ar file 48df54ea80SEitan AdlerCopy the public key contained in 492beb7085SEitan Adler.Ar file . 502beb7085SEitan AdlerThis option can be specified multiple times and can be combined with 512beb7085SEitan Adlerthe 522beb7085SEitan Adler.Fl l 532beb7085SEitan Adleroption. 54df54ea80SEitan AdlerIf a private key is specified and a public key is found then the public key 55df54ea80SEitan Adlerwill be used. 562beb7085SEitan Adler.It Fl l 572beb7085SEitan AdlerCopy the keys currently held by 582beb7085SEitan Adler.Xr ssh-agent 1 . 592beb7085SEitan AdlerThis is the default if the 602beb7085SEitan Adler.Fl i 612beb7085SEitan Adleroption was not specified. 622beb7085SEitan Adler.It Fl o Ar ssh-option 632beb7085SEitan AdlerPass this option directly to 642beb7085SEitan Adler.Xr ssh 1 . 652beb7085SEitan AdlerThis option can be specified multiple times. 662beb7085SEitan Adler.It Fl p Ar port 672beb7085SEitan AdlerConnect to the specified port on the remote host instead of the 682beb7085SEitan Adlerdefault. 69df54ea80SEitan Adler.It Fl v 70df54ea80SEitan AdlerPass -v to 71df54ea80SEitan Adler.Xr ssh 1 . 722beb7085SEitan Adler.El 732beb7085SEitan Adler.Pp 742beb7085SEitan AdlerThe remaining arguments are a list of remote hosts to connect to, 752beb7085SEitan Adlereach one optionally qualified by a user name. 76a0f63581SEitan Adler.Sh EXIT STATUS 77a0f63581SEitan Adler.Ex -std 78843ab1e8SEitan Adler.Sh EXAMPLES 79843ab1e8SEitan AdlerTo send a specific key to multiple hosts: 80843ab1e8SEitan Adler.Dl $ ssh-copy-id -i /path/to/keyfile.pub user@host1 user@host2 user@host3 812beb7085SEitan Adler.Sh HISTORY 822beb7085SEitan AdlerThe 832beb7085SEitan Adler.Nm 842beb7085SEitan Adlerutility was written by 85*2b7af31cSBaptiste Daroussin.An Eitan Adler Aq Mt eadler@FreeBSD.org 862beb7085SEitan Adleras a drop-in replacement for an existing utility included with 872beb7085SEitan AdlerOpenSSH. 88