blob: cb15ab24dbc4304305ccd5d39602cfdefe7477bf [file] [log] [blame]
Damien Miller8b1c22b2000-03-15 12:13:01 +11001.ig \" -*- nroff -*-
2Copyright (c) 1999 Philip Hands Computing <http://www.hands.com/>
3
4Permission is granted to make and distribute verbatim copies of
5this manual provided the copyright notice and this permission notice
6are preserved on all copies.
7
8Permission is granted to copy and distribute modified versions of this
9manual under the conditions for verbatim copying, provided that the
10entire resulting derived work is distributed under the terms of a
11permission notice identical to this one.
12
13Permission is granted to copy and distribute translations of this
14manual into another language, under the above conditions for modified
15versions, except that this permission notice may be included in
16translations approved by the Free Software Foundation instead of in
17the original English.
18..
19.TH SSH-COPY-ID 1 "14 November 1999" "OpenSSH"
20.SH NAME
Damien Miller02666772009-01-21 20:29:20 +110021ssh-copy-id \- install your public key in a remote machine's authorized_keys
Damien Miller8b1c22b2000-03-15 12:13:01 +110022.SH SYNOPSIS
23.B ssh-copy-id [-i [identity_file]]
24.I "[user@]machine"
25.br
26.SH DESCRIPTION
27.BR ssh-copy-id
Darren Tucker12b29db2010-07-19 21:24:13 +100028is a script that uses ssh to log into a remote machine and
29append the indicated identity file to that machine's
Damien Miller8b1c22b2000-03-15 12:13:01 +110030.B ~/.ssh/authorized_keys
Darren Tucker12b29db2010-07-19 21:24:13 +100031file.
Damien Miller8b1c22b2000-03-15 12:13:01 +110032.PP
33If the
34.B -i
35option is given then the identity file (defaults to
Damien Miller02666772009-01-21 20:29:20 +110036.BR ~/.ssh/id_rsa.pub )
Damien Miller8b1c22b2000-03-15 12:13:01 +110037is used, regardless of whether there are any keys in your
38.BR ssh-agent .
39Otherwise, if this:
40.PP
41.B " ssh-add -L"
42.PP
43provides any output, it uses that in preference to the identity file.
44.PP
45If the
46.B -i
47option is used, or the
48.B ssh-add
49produced no output, then it uses the contents of the identity
50file. Once it has one or more fingerprints (by whatever means) it
51uses ssh to append them to
Ben Lindstrom42717bf2000-12-28 15:46:20 +000052.B ~/.ssh/authorized_keys
Darren Tucker12b29db2010-07-19 21:24:13 +100053on the remote machine (creating the file, and directory, if necessary.)
54
55.SH NOTES
56This program does not modify the permissions of any
57pre-existing files or directories. Therefore, if the remote
58.B sshd
59has
60.B StrictModes
61set in its
62configuration, then the user's home,
63.B ~/.ssh
64folder, and
65.B ~/.ssh/authorized_keys
66file may need to have group writability disabled manually, e.g. via
67
68.B " chmod go-w ~ ~/.ssh ~/.ssh/authorized_keys"
69
70on the remote machine.
Damien Miller8b1c22b2000-03-15 12:13:01 +110071
72.SH "SEE ALSO"
73.BR ssh (1),
74.BR ssh-agent (1),
75.BR sshd (8)