add some posts
This commit is contained in:
@@ -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终端中就可以进行简便连接如
|
||||
|
Reference in New Issue
Block a user