Ssh-copy-id command

Source: Internet
Author: User

The SSH-copy-id command can install the local SSH public key file to the account corresponding to the remote host.

I have been manually using SCP and SSH commands to execute this task. I just found this convenient command!

 

SSH-COPY-ID (1) SSH-COPY-ID (1)

 

Name

Ssh-copy-ID-install your public key in a remote machine's authorized_keys

 

Synopsis

Ssh-copy-ID [-I [identity_file] [user @] Machine

 

Description

Ssh-copy-ID is a script that uses SSH to log into a remote machine (presumably using a login password, so Password Authentication shocould be enabled, unless you 've

Done some clever use of multiple identities)

 

It also changes the permissions of the remote user's home ,~ /. Ssh, and ~ /. Ssh/authorized_keys to remove group writability (which wowould otherwise prevent you from

Logging in, if the remote sshd has strictmodes set in its configuration ).

 

If the-I option is given then the identity file (defaults ~ /. Ssh/id_rsa.pub) is used, regardless of whether there are any keys in your ssh-agent. Otherwise, if

This:

 

Ssh-add-l

 

Provides any output, it uses that in preference to the identity file.

 

If the-I option is used, or the ssh-add produced no output, then it uses the contents of the Identity file. Once it has one or more fingerprints (by whatever

Means) It uses SSH to append them ~ /. Ssh/authorized_keys on the remote machine (creating the file, and directory, if necessary)

 

See also

SSH (1), ssh-agent (1), sshd (8)

 

OpenSSH 14 November 1999 SSH-COPY-ID (1)

Manual page ssh-copy-ID (1) line 1/34 (end)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.