We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c3e373 commit addaa49Copy full SHA for addaa49
1 file changed
docs/cheatsheet/vscode/ssh_nopasswd.md
@@ -29,6 +29,36 @@
29
30
---
31
32
+### 第 1.1 步:在 Linux (终端)
33
+
34
+**1. 生成 SSH 密钥对**
35
36
+* 推荐使用 Ed25519 算法。
37
38
+ ```bash
39
+ ssh-keygen -t ed25519 -C "your_email@example.com"
40
+ ```
41
+ * 一路按回车键即可 (默认路径,无密码短语)。
42
43
+**2. 定位密钥文件**
44
45
+* **私钥 (Private Key):** `~/.ssh/id_ed25519`
46
+ > **[警告]** 此文件绝对不能泄露!
47
+* **公钥 (Public Key):** ``
48
+ > **[提示]** 这是需要复制到目标服务器的文件。
49
50
+**3. 复制公钥内容**
51
52
+* 在终端中执行以下命令,然后复制整行输出。
53
54
55
+ cat ~/.ssh/id_ed25519.pub
56
57
58
+* 公钥内容以 `ssh-ed25519` 或 `ssh-rsa` 开头。
59
60
+---
61
62
### 第 2 步:在 macOS (终端)
63
64
**1. 粘贴公钥**
0 commit comments