Skip to content
This repository was archived by the owner on Apr 7, 2026. It is now read-only.

Commit b5e5f42

Browse files
committed
fix
1 parent 14fae54 commit b5e5f42

3 files changed

Lines changed: 23 additions & 23 deletions

File tree

docs/.vitepress/config/zh.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function sidebarGuide(): DefaultTheme.Sidebar {
6464
text: '附录',
6565
items: [
6666
{ text: '提问的艺术', link: '/appendix/how-to-ask' },
67-
{ text: 'SSH 配置指南', link: '/appendix/ssh配置指南' },
67+
{ text: '使用 SSH 连接服务器', link: '/appendix/ssh-server' },
6868
]
6969
},
7070
{
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# SSH 配置指南
1+
# 使用 SSH 连接服务器
22

3-
本指南将帮助使用 macOS 系统的同学完成 SSH 密钥对的生成与配置,并连接到本课程提供的服务器环境进行实验。
3+
本文档将帮助使用 macOS 系统的同学完成 SSH 密钥对的生成与配置,并连接到本课程提供的服务器环境进行实验。
44

55
## 1. SSH 简介
66

@@ -44,12 +44,12 @@ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
4444

4545
执行上述命令后,系统会提示您进行一系列配置:
4646

47-
```bash
48-
# 连按三个回车即可
49-
Enter file in which to save the key (/Users/yourusername/.ssh/id_rsa):
50-
Enter passphrase (empty for no passphrase):
51-
Enter same passphrase again:
52-
```
47+
```bash
48+
# 连按三个回车即可
49+
Enter file in which to save the key (/Users/yourusername/.ssh/id_rsa):
50+
Enter passphrase (empty for no passphrase):
51+
Enter same passphrase again:
52+
```
5353

5454
### 验证密钥生成
5555

@@ -72,9 +72,9 @@ cat ~/.ssh/id_rsa.pub
7272

7373
观察到输出为:`ssh-rsa xxxxxxxxxxxxxxx = xxxxx@xxxx.xx` 即正确
7474

75-
## 3. 将服务器与 VS Code 连接
75+
## 3. 使用 VS Code 的 Remote 插件进行远程开发
7676

77-
### VS Code 中,安装对应拓展
77+
### 安装 VS Code 插件
7878

7979
![remote_explorer](remote_explorer.png)
8080

@@ -95,16 +95,16 @@ cat ~/.ssh/id_rsa.pub
9595
ssh root@服务器地址 -p 端口号
9696
```
9797

98-
![ssh_server](ssh_server2.png)
98+
![ssh_server](ssh_server2.png)
9999

100-
首次连接时,系统会显示服务器的指纹信息并询问是否信任:
100+
首次连接时,系统会显示服务器的指纹信息并询问是否信任:
101101

102-
```bash
103-
The authenticity of host 'xxxxxxx' can't be established.
104-
ECDSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
105-
Are you sure you want to continue connecting (yes/no/[fingerprint])?
106-
```
102+
```bash
103+
The authenticity of host 'xxxxxxx' can't be established.
104+
ECDSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
105+
Are you sure you want to continue connecting (yes/no/[fingerprint])?
106+
```
107107
108-
输入 `yes` 并按回车键继续。
108+
输入 `yes` 并按回车键继续。
109109
110-
如果配置正确,您应该能够成功登录到服务器而无需输入密码。
110+
如果配置正确,您应该能够成功登录到服务器而无需输入密码。

docs/lab/manual.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,17 @@ Git 的常用操作可以通过 [Git 学习网站](https://learngitbranching.js.
190190

191191
### SSH
192192

193-
在 ICS 课程中没有直接使用 SSH 连接服务器的内容,但你可能需要[使用 SSH 连接 GitHub](https://docs.github.com/cn/authentication/connecting-to-github-with-ssh/)。SSH 的完整文档可以通过 man ssh 查阅
193+
本课程中,使用 Mac 的同学需要使用 SSH 连接服务器,请参考[这个文档](/appendix/ssh-server)
194194

195-
如果你从未使用过 SSH,你可能需要为自己创建一个密钥对,参考指令:`ssh-keygen -t ed25519 -C "your_email@example.com"`。密钥对的默认保存位置为 `~/.ssh/`,其中的 `id_rsa` 为私钥,`id_rsa.pub` 为公钥。如果你好奇密钥是如何工作的,可以参考[这篇文章](https://www.ruanyifeng.com/blog/2011/08/what_is_a_digital_signature.html)
195+
你可能还需要[使用 SSH 连接 GitHub](https://docs.github.com/cn/authentication/connecting-to-github-with-ssh/)。SSH 的完整文档可以通过 man ssh 查阅
196196

197197
### Vim
198198

199199
Vim 的基本用法为运行 `vim something.txt` 打开文件,然后按 `i` 键编辑文件,此时可以直接打字,完成后按 `ESC` 键,输入 `:wq` 保存并退出,或输入 `:q!` 不保存直接退出。
200200

201201
由于 Vim 有一些学习难度,大家当然可以直接选择开箱即用的 VS Code ,但是如果你习惯了 Vim 的操作,用起来就非常爽快。
202202

203-
Vim 的用法非常丰富,如有兴趣可以通过 Vim 自带的教程程序 `vimtutor` 学习(在安装 vim 之后直接在命令行输入这个即可),也可以通过 [Vim 学习网站](https://vim-adventures.com/)学习,或者参考[这个保姆级入门视频](https://www.bilibili.com/video/BV13t4y1t7Wg)
203+
Vim 的用法非常丰富,如有兴趣可以通过 Vim 自带的教程程序 `vimtutor` 学习(在安装 Vim 之后直接在命令行输入这个即可),也可以通过 [Vim 学习网站](https://vim-adventures.com/)学习,或者参考[这个保姆级入门视频](https://www.bilibili.com/video/BV13t4y1t7Wg)
204204

205205
> Copilot 官方提供了一个 [Vim 插件](https://github.com/github/copilot.vim),可以让你在 Vim 中使用 Copilot。
206206

0 commit comments

Comments
 (0)