1SSH-COPY-ID(1) General Commands Manual SSH-COPY-ID(1)
2
3
4
6 ssh-copy-id - install your public key in a remote machine's autho‐
7 rized_keys
8
10 ssh-copy-id [-i [identity_file]] [user@]machine
11
13 ssh-copy-id is a script that uses ssh to log into a remote machine
14 (presumably using a login password, so password authentication should
15 be enabled, unless you've done some clever use of multiple identities)
16
17 It also changes the permissions of the remote user's home, ~/.ssh, and
18 ~/.ssh/authorized_keys to remove group writability (which would other‐
19 wise prevent you from logging in, if the remote sshd has StrictModes
20 set in its configuration).
21
22 If the -i option is given then the identity file (defaults to
23 ~/.ssh/id_rsa.pub) is used, regardless of whether there are any keys in
24 your ssh-agent. Otherwise, if this:
25
26 ssh-add -L
27
28 provides any output, it uses that in preference to the identity file.
29
30 If the -i option is used, or the ssh-add produced no output, then it
31 uses the contents of the identity file. Once it has one or more fin‐
32 gerprints (by whatever means) it uses ssh to append them to
33 ~/.ssh/authorized_keys on the remote machine (creating the file, and
34 directory, if necessary)
35
36
38 ssh(1), ssh-agent(1), sshd(8)
39
40
41
42OpenSSH 14 November 1999 SSH-COPY-ID(1)