UNPKG

716 BMarkdownView Raw
1ssh-copy-id
2===
3
4把本地的ssh公钥文件安装到远程主机对应的账户下
5
6## 补充说明
7
8**ssh-copy-id命令** 可以把本地主机的公钥复制到远程主机的authorized_keys文件上,ssh-copy-id命令也会给远程主机的用户主目录(home)和`~/.ssh`, 和`~/.ssh/authorized_keys`设置合适的权限。
9
10### 语法
11
12```shell
13ssh-copy-id [-i [identity_file]] [user@]machine
14```
15
16### 选项
17
18```shell
19-i:指定公钥文件
20```
21
22### 实例
23
241、把本地的ssh公钥文件安装到远程主机对应的账户下:
25
26```shell
27ssh-copy-id user@server
28ssh-copy-id -i ~/.ssh/id_rsa.pub user@server
29```
30
31
32<!-- Linux命令行搜索引擎:https://jaywcjlove.github.io/linux-command/ -->
\No newline at end of file