edit Commands-for-Server-Operation-and-Maintenance
All checks were successful
Deploy / deploy (push) Successful in 32s

This commit is contained in:
Cat Tom
2026-03-04 19:24:30 +08:00
parent 0b2f8a06d7
commit a8694b2abf

View File

@@ -23,7 +23,7 @@ Maria:
```bash
ssh-keygen -m PEM -t rsa -b 4096 -C "[username]@[server_ip]" -f ~/.ssh/[server_name]
ssh-copy-id -i /home/cattom/.ssh/[server_name].pub root@[server_ip]
ssh-copy-id -p 25800 -i /home/cattom/.ssh/[server_name].pub root@[server_ip]
```
最后,修改 `/etc/ssh/sshd_config`:
@@ -208,6 +208,22 @@ Maria 非标端口开放表:
sudo docker exec -it [container_name] /bin/sh
```
## 配置 SSH Action
### GitHub Actions
[cattomgithub/maria - Settings - Secrets - Actions](https://github.com/cattomgithub/maria/settings/secrets/actions)
- SSH_HOSTS: foo,bar
服务器需配置 GitHub Actions Key进入 CatTomServer3-1 的终端,执行:
```bash
ssh-copy-id -f -p 25800 -i /home/cattom/.ssh/maria-github-actions-key.pub [server_id]
```
[Ref: 用于 GitHub Actions 的 SSH](https://github.com/appleboy/ssh-action/blob/master/README.zh-cn.md)
## NFS 配置
```bash