mirror of
https://gitee.com/SuperManito/LinuxMirrors
synced 2026-02-19 12:05:41 +08:00
bug fix
This commit is contained in:
@@ -410,11 +410,11 @@ hide:
|
||||
|
||||
- Configure `SSH` service
|
||||
|
||||
``` { .bash .no-copy title="Allow root account login" }
|
||||
``` { .bash title="Allow root account login" }
|
||||
cat /etc/ssh/sshd_config | grep -Eq "^[# ]?PermitRootLogin " ; [ $? -eq 0 ] && sed -i 's/^[# ]\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config || echo -e "\nPermitRootLogin yes" >> /etc/ssh/sshd_config
|
||||
```
|
||||
|
||||
``` { .bash .no-copy title="Enable password authentication" }
|
||||
``` { .bash title="Enable password authentication" }
|
||||
cat /etc/ssh/sshd_config | grep -Eq "^[# ]?PasswordAuthentication " ; [ $? -eq 0 ] && sed -i 's/^[# ]\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config || echo -e "\nPasswordAuthentication yes" >> /etc/ssh/sshd_config
|
||||
```
|
||||
|
||||
|
||||
@@ -412,11 +412,11 @@ hide:
|
||||
|
||||
- 配置 `SSH` 服务
|
||||
|
||||
``` { .bash .no-copy title="允许 root 账户登录" }
|
||||
``` { .bash title="允许 root 账户登录" }
|
||||
cat /etc/ssh/sshd_config | grep -Eq "^[# ]?PermitRootLogin " ; [ $? -eq 0 ] && sed -i 's/^[# ]\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config || echo -e "\nPermitRootLogin yes" >> /etc/ssh/sshd_config
|
||||
```
|
||||
|
||||
``` { .bash .no-copy title="启用密码认证" }
|
||||
``` { .bash title="启用密码认证" }
|
||||
cat /etc/ssh/sshd_config | grep -Eq "^[# ]?PasswordAuthentication " ; [ $? -eq 0 ] && sed -i 's/^[# ]\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config || echo -e "\nPasswordAuthentication yes" >> /etc/ssh/sshd_config
|
||||
```
|
||||
|
||||
|
||||
@@ -412,11 +412,11 @@ hide:
|
||||
|
||||
- 設定 `SSH` 服務
|
||||
|
||||
``` { .bash .no-copy title="允許 root 帳戶登入" }
|
||||
``` { .bash title="允許 root 帳戶登入" }
|
||||
cat /etc/ssh/sshd_config | grep -Eq "^[# ]?PermitRootLogin " ; [ $? -eq 0 ] && sed -i 's/^[# ]\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config || echo -e "\nPermitRootLogin yes" >> /etc/ssh/sshd_config
|
||||
```
|
||||
|
||||
``` { .bash .no-copy title="啟用密碼認證" }
|
||||
``` { .bash title="啟用密碼認證" }
|
||||
cat /etc/ssh/sshd_config | grep -Eq "^[# ]?PasswordAuthentication " ; [ $? -eq 0 ] && sed -i 's/^[# ]\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config || echo -e "\nPasswordAuthentication yes" >> /etc/ssh/sshd_config
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user