This commit is contained in:
2 files changed
+29
-9
No files matched your search
@@ -6,7 +6,7 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Server pull maria config file from remote
|
- name: Pull from remote & Upload artifacts to Aliyun OSS
|
||||||
uses: appleboy/ssh-action@v1.2.5
|
uses: appleboy/ssh-action@v1.2.5
|
||||||
with:
|
with:
|
||||||
host: "100.114.118.48"
|
host: "100.114.118.48"
|
||||||
|
|||||||
@@ -162,14 +162,28 @@ ssh-copy-id -p 25800 ...
|
|||||||
|
|
||||||
**修改 SSH 配置**
|
**修改 SSH 配置**
|
||||||
|
|
||||||
``` bash
|
```bash
|
||||||
sudo nano /etc/ssh/sshd_config
|
sudo tee /etc/ssh/sshd_config.d/00-user.conf >/dev/null <<'EOF'
|
||||||
|
Port 25800
|
||||||
|
PermitRootLogin prohibit-password
|
||||||
|
PubkeyAuthentication yes
|
||||||
|
PasswordAuthentication no
|
||||||
|
KbdInteractiveAuthentication no
|
||||||
|
AuthenticationMethods publickey
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sudo chown root:root /etc/ssh/sshd_config.d/00-user.conf
|
||||||
|
sudo chmod 644 /etc/ssh/sshd_config.d/00-user.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
- Port 22 → **Port 25800**
|
**检查 SSH 配置**
|
||||||
- PermitRootLogin **prohibit-password** (取消该行注释)
|
|
||||||
- PasswordAuthentication yes → PasswordAuthentication **no**
|
```bash
|
||||||
- (可选) PubkeyAuthentication **yes**
|
# 检查配置语法
|
||||||
|
sudo /usr/sbin/sshd -t
|
||||||
|
# 查看配置是否正确生效
|
||||||
|
sudo /usr/sbin/sshd -T
|
||||||
|
```
|
||||||
|
|
||||||
重启 SSH 服务以刷新配置: `sudo systemctl restart ssh`
|
重启 SSH 服务以刷新配置: `sudo systemctl restart ssh`
|
||||||
|
|
||||||
@@ -269,9 +283,12 @@ echo 'alias flexget="/root/flexget/bin/flexget -c /root/flexget/config.yml"' >>
|
|||||||
| 1 | 8090 | / | / | / | UpSnap |
|
| 1 | 8090 | / | / | / | UpSnap |
|
||||||
| 1 | 9090 | / | / | / | One-KVM [^1] |
|
| 1 | 9090 | / | / | / | One-KVM [^1] |
|
||||||
|
|
||||||
[^1]: 服务器 1 的 One-KVM 与 Uptime Kuma 都在容器内。可能由于容器间的网络有特殊限制,One-KVM 需要在宿主机处开放端口,才能让 Uptime Kuma 正常访问。
|
| 服务器 | 端口 | 来源IP/IP段 | 目标IP/IP段 | 协议 | 备注 |
|
||||||
|
| :----: | :---: | :------------: | :---------: | :---: | :---: |
|
||||||
|
| 3-1 | 8080 | 192.168.1.0/24 | / | / | Dagu |
|
||||||
|
|
||||||
*CatTomServer3-1 无非标端口开放。*
|
|
||||||
|
[^1]: 服务器 1 的 One-KVM 与 Uptime Kuma 都在容器内。可能由于容器间的网络有特殊限制,One-KVM 需要在宿主机处开放端口,才能让 Uptime Kuma 正常访问。
|
||||||
|
|
||||||
**Maria 非标端口开放表**
|
**Maria 非标端口开放表**
|
||||||
|
|
||||||
@@ -314,7 +331,10 @@ sudo ufw allow 7100
|
|||||||
# Example 2
|
# Example 2
|
||||||
sudo ufw allow from 127.0.0.1 to any port 18080
|
sudo ufw allow from 127.0.0.1 to any port 18080
|
||||||
# Example 3
|
# Example 3
|
||||||
|
sudo ufw allow from 192.168.1.0/24 to any port 8080
|
||||||
|
# Example 4
|
||||||
sudo ufw allow 6888/udp
|
sudo ufw allow 6888/udp
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
|
|||||||
Reference in new issue
Block a user