docs: enhance language support and improve documentation clarity

- Add Simplified Chinese as an option in the language selection
- Improve the phrasing of sentences for clarity in the GitHub Action description
- Update instructions for enabling synchronous execution for multiple hosts
- Clarify the default behavior for the cipher option
- Change the wording for SSH command execution to enhance readability
- Update the username in the example to a specific value
- Revise instructions for copying SSH keys to include installation steps for the `clip` command
- Adjust the phrasing for security practices regarding private key protection
- Update the license statement to specify the MIT license more clearly
- Change section titles for better consistency and clarity across languages

Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
appleboy 2025-03-08 15:47:51 +08:00
parent d99ccf8c09
commit 01a53594eb
No known key found for this signature in database
2 changed files with 98 additions and 64 deletions

View file

@ -1,6 +1,6 @@
# 🚀 GitHub Actions 的 SSH
[English](./README.md) | [简体中文](./README.zh-cn.md)
[English](./README.md) | 繁體中文 | [简体中文](./README.zh-cn.md)
[GitHub Action](https://github.com/features/actions) 用於執行遠端 SSH 命令。
@ -68,7 +68,7 @@ jobs:
uses: appleboy/ssh-action@v1.2.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
username: linuxserver.io
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: whoami
@ -80,7 +80,7 @@ jobs:
======CMD======
whoami
======END======
out: ***
linuxserver.io
===============================================
✅ Successfully executed commands to all hosts.
===============================================
@ -120,19 +120,34 @@ cat .ssh/id_ed25519.pub | ssh b@B 'cat >> .ssh/authorized_keys'
### 複製 rsa 私鑰內容
在複製私鑰之前,請按照以下說明安裝 `clip` 命令:
```bash
clip < ~/.ssh/id_rsa
# Ubuntu
sudo apt-get install xclip
```
複製私鑰:
```bash
# macOS
pbcopy < ~/.ssh/id_rsa
# Ubuntu
xclip < ~/.ssh/id_rsa
```
### 複製 ed25519 私鑰內容
```bash
clip < ~/.ssh/id_ed25519
# macOS
pbcopy < ~/.ssh/id_ed25519
# Ubuntu
xclip < ~/.ssh/id_ed25519
```
有關無需密碼登錄 SSH 的詳細信息,請[參見該網站](http://www.linuxproblem.org/art_9.html)。
**來自讀者的注意事項** 根據您的 SSH 版本,您可能還需要進行以下更改:
**注意**根據您的 SSH 版本,您可能還需要進行以下更改:
- 將公鑰放在 `.ssh/authorized_keys2`
- 將 `.ssh` 的權限更改為 700
@ -203,7 +218,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
![result](./images/output-result.png)
#### Commands from a file
#### 從文件中執行命令
```yaml
- name: file commands