change the world

This commit is contained in:
2026-01-17 15:30:37 +08:00
parent d1b2aef9c7
commit 6c18bac83c
15 changed files with 3274 additions and 3 deletions

View File

@@ -1,2 +0,0 @@
# 前言
最近迷上了三角洲

View File

@@ -34,7 +34,8 @@ sudo -i
##### 复制公钥到服务器
进入/root/.ssh文件夹
```shell
cd /root/.ssh
cd /root/.ssh #root用户
#cd ~/.ssh #普通用户
```
创建或编辑 authorized_keys 文件
```shell
@@ -48,6 +49,22 @@ vim authorized_keys
```shell
cd /etc/ssh
```
这一步有可能服务器没有安装SSH服务端就没有sshd_config文件
安装ssh服务端
```shell
apt intsall openssh-server #安装openssh服务端
```
验证服务状态
```shell
systemctl status ssh #查看SSH服务运行状态
```
看到绿色的activerunning说明正常运行
按Ctrl + C退回到命令行
查看ssh目录下的文件
```shell
ls
```
看到有了sshd_config 和 sshd_config.d即可
编辑sshd_config文件
```shell
vim sshd_config