- Remove the Table of Contents section to simplify documentation.
- Add and reorganize introduction sections for a clearer project overview.
- Rename and clarify section titles for improved structure and navigation.
- Consolidate and expand explanatory text around SSH key setup, OpenSSH compatibility, security, and troubleshooting.
- Provide richer descriptions for core concepts and advanced SSH usage scenarios.
- Apply the same documentation improvements and structural changes across English, Simplified Chinese, and Traditional Chinese readme files for consistency.
Signed-off-by: appleboy <appleboy.tw@gmail.com>
- [Command not found (npm or other command)](#command-not-found-npm-or-other-command)
- [🤝 Contributing](#-contributing)
- [📝 License](#-license)
A [GitHub Action](https://github.com/features/actions) for executing remote SSH commands easily and securely.
---
## 📖 Introduction
**SSH for GitHub Actions** is a powerful [GitHub Action](https://github.com/features/actions) for executing remote SSH commands easily and securely in your CI/CD workflows.
Built with [Golang](https://go.dev) and [drone-ssh](https://github.com/appleboy/drone-ssh), it supports a wide range of SSH scenarios, including multi-host, proxy, and advanced authentication.

[](https://github.com/appleboy/ssh-action/actions/workflows/main.yml)
This project is built with [Golang](https://go.dev) and [drone-ssh](https://github.com/appleboy/drone-ssh).
---
## 📥 Input Parameters
## 🧩 Core Concepts & Input Parameters
This action provides flexible SSH command execution with a rich set of configuration options.
For full details, see [action.yml](./action.yml).
@ -85,9 +63,9 @@ For full details, see [action.yml](./action.yml).
---
## 🚦 Usage Example
## ⚡ Quick Start
Run remote SSH commands in your workflow:
Run remote SSH commands in your workflow with minimal configuration:
```yaml
name: Remote SSH Command
@ -121,17 +99,19 @@ linuxserver.io
---
## 🔑 Setting Up SSH Keys
## 🔑 SSH Key Setup & OpenSSH Compatibility
### Setting Up SSH Keys
It is best practice to create SSH keys on your local machine (not on a remote server). Log in with the username specified in GitHub Secrets and generate a key pair:
This section covers common and advanced usage patterns, including multi-host, proxy, and environment variable passing.
### Using password authentication
@ -331,7 +311,9 @@ Default `port` is `22`.
---
## 🌐 Using ProxyCommand (Jump Host)
## 🌐 Proxy & Jump Host Usage
You can connect to remote hosts via a proxy (jump host) for advanced network topologies.
```bash
+--------+ +----------+ +-----------+
@ -376,7 +358,9 @@ Host FooServer
---
## 🔒 Protecting Your Private Key
## 🛡️ Security Best Practices
### Protecting Your Private Key
A passphrase encrypts your private key, making it useless to attackers if leaked. Always store your private key securely.
@ -394,9 +378,7 @@ A passphrase encrypts your private key, making it useless to attackers if leaked
ls -al
```
---
## 🖐️ Host Fingerprint Verification
### Host Fingerprint Verification
Verifying the SSH host fingerprint helps prevent man-in-the-middle attacks. To get your host's fingerprint (replace `ed25519` with your key type and `example.com` with your host):
@ -422,9 +404,11 @@ Update your config:
---
## ❓ Q&A
## 🚨 Error Handling & Troubleshooting
### Q&A
### Command not found (npm or other command)
#### Command not found (npm or other command)
If you encounter "command not found" errors, see [this issue comment](https://github.com/appleboy/ssh-action/issues/31#issuecomment-1006565847) about interactive vs non-interactive shells.
[](https://github.com/appleboy/ssh-action/actions/workflows/main.yml)
[](https://github.com/appleboy/ssh-action/actions/workflows/main.yml)