A GitHub Action that runs Claude Code on PRs and issues to answer questions, review changes, and implement code.
appleboy/ssh-action
A GitHub Action that runs commands on remote servers over SSH from your CI/CD workflows.
- Stars
- 6,225
- Forks
- 679
- Open issues
- 32
- Last commit
- 2 months ago
What is it?
SSH for GitHub Actions lets a workflow log into one or more remote hosts over SSH and run shell commands or a script file on them. It is commonly used to deploy code, restart services, or run maintenance tasks on servers as part of a GitHub Actions pipeline. The action is built with Golang on top of drone-ssh.
Connection options cover password and private key authentication, custom ports, IPv4/IPv6 protocol selection, host fingerprint checks, and jump hosts through a separate proxy configuration. Multiple hosts can be targeted in one step, either in parallel or synchronously. Environment variables can be passed to the remote script, and standard output can be captured as a step output for later steps.
The repository includes setup guidance for generating RSA and ED25519 keys, notes on OpenSSH compatibility for older algorithms, and troubleshooting for shells where commands are not found.
Key features
- 01Run multiple commands or a script file on remote hosts
- 02Authenticate with a password or a private key, with passphrase support
- 03Deploy to several hosts, either in parallel or synchronously
- 04Connect through a jump host using separate proxy settings
- 05Pass environment variables to the remote script
- 06Capture command output for use in later workflow steps
Use cases
- Deploying a built application to a VPS or on-premise server after a push
- Restarting services or running database migrations on remote machines from CI
- Running maintenance scripts across a fleet of hosts in one workflow step
- Reaching private servers behind a bastion host from GitHub-hosted runners
Quick start
- 1
Add the appleboy/ssh-action workflow step with host, username, key and script inputs
- 2
Store HOST, USERNAME, KEY and PORT as GitHub Secrets and reference them in the step
- 3
Push to the repository to trigger the workflow and run the remote commands
Things to know
- It runs only inside GitHub Actions workflows, not as a standalone command-line tool.
- Remote hosts must accept SSH connections from GitHub runners and have key or password login configured.
Topics
FAQ
- What is ssh-action?
- A GitHub Action that runs commands on remote servers over SSH from your CI/CD workflows. SSH for GitHub Actions lets a workflow log into one or more remote hosts over SSH and run shell commands or a script file on them. It is commonly used to deploy code, restart services, or run maintenance tasks on servers as part of a GitHub Actions pipeline. The action is built with Golang on top of drone-ssh.
- Is ssh-action free to use? What license does it have?
- ssh-action is open source under the MIT license. Check the license terms before using it in commercial products.
- Is ssh-action still maintained?
- Updated within 6 months. The last commit to ssh-action was on Aug 16, 2026.
- What can I use ssh-action for?
- Deploying a built application to a VPS or on-premise server after a push Restarting services or running database migrations on remote machines from CI Running maintenance scripts across a fleet of hosts in one workflow step Reaching private servers behind a bastion host from GitHub-hosted runners
- How do I install ssh-action?
- Add the appleboy/ssh-action workflow step with host, username, key and script inputs Store HOST, USERNAME, KEY and PORT as GitHub Secrets and reference them in the step Push to the repository to trigger the workflow and run the remote commands
- Where can I get ssh-action?
- The source code and installation instructions are on GitHub: https://github.com/appleboy/ssh-action
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source IaC orchestration that runs Terraform and OpenTofu inside your existing CI pipeline, with plan and apply driven from pull request comments.
GitHub CLI extension that lets you write AI-powered repository automation as Markdown and runs it securely through GitHub Actions.
A programmable automation engine that builds, tests and ships codebases using containers, running locally, in CI or in the cloud.
A GitHub Action that pulls your latest blog posts from RSS feeds into your profile or project README on a schedule.
Automatically crawls daily arXiv papers in chosen categories, summarizes them with an LLM, and publishes a browsable site via GitHub Pages.