Get the App
SLTechnology News&Howtos  ›  Servers  › 

Use the ssh-copy-id command of linux to copy the public key to the remote host

Shulou Source: shulou.com Published: 2022-06-02 12:44:11 11月27日 Update

This article will explain in detail about using linux's ssh-copy-id command to copy the public key to the remote host. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

The ssh-copy-id command copies the local host's public key to the remote host's authorized_keys file, and the ssh-copy-id command also sets appropriate permissions to the remote host's user home directory (home) and ~ / .ssh, and ~ / .ssh/authorized_keys.

Syntax format: ssh-copy-id [parameters]

Common parameters:

-I specify the public key file

Reference example

Copy the local public key to the remote host:

[root@linuxcool] # ssh-copy-id-I / root/.ssh/id_rsa.pub root@192.168.3.22 about using linux's ssh-copy-id command to copy the public key to the remote host and share it here. I hope the above content can be helpful to you and learn more. If you think the article is good, you can share it for more people to see.

Tags: Host public key commands parameters files more articles references good appropriate practical content examples commonly used heads of users copies articles permissions formats directories Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei MariaDB Shulou Tech Info MySQL NVidia