add some posts

This commit is contained in:
zibright
2025-07-22 00:44:40 +08:00
parent c40fa690cf
commit 127dc36845
4 changed files with 204 additions and 8 deletions

View File

@@ -67,7 +67,7 @@ systemctl restart sshd
```shell
service ssh restart
```
##### 不要断开SSH连接防止配置有问题连接不上
##### **不要断开SSH连接防止配置有问题连接不上**
## 使用密钥对进行连接
### 直接连接
新开一个PowerShell终端
@@ -89,17 +89,17 @@ noteapd config
格式如
```shell
Host test
HostName 192.168.21.5
IdentityFile ~/.ssh/test
User root
HostName 192.168.21.5
IdentityFile ~/.ssh/test
User root
```
如果端口不是22则需要加上端口如ssh使用222端口
```shell
Host test
HostName 192.168.21.5
IdentityFile ~/.ssh/test
Port 222
User root
HostName 192.168.21.5
IdentityFile ~/.ssh/test
Port 222
User root
```
保存
然后在PowerShell终端中就可以进行简便连接如