ssh-action
CLAUDE.md6.2k starsChanged 3 months agoMITView on GitHub
This is a GitHub Action for executing remote SSH commands. Built using a composite action pattern, it downloads and runs the drone-ssh binary (written in Go) to execute SSH commands on remote hosts. Key characteristics: Tests run automatically via GitHub Actions workflows. The test suite uses Docker containers running OpenSSH servers: The test workflow covers: Since this action downloads binaries, local testing should: Users can provide scripts in two ways: To stop execution on first error (mimics removed script_stop option),…
We split this CLAUDE.md into the rules it gives an agent
13 rules. About 0 are common, 7 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
No local compilation required - downloads pre-built binaries from drone-ssh releases
- Very specific: line 14
All input parameters are passed via INPUT_* environment variables
- Distinctive: line 33
Not part of this repository
- Distinctive: line 75
Create a test SSH server (Docker or VM)
- Very specific: line 76
Test entrypoint.sh directly with appropriate INPUT_* environment variables
- Distinctive: line 133
Use absolute paths in commands
- Very specific: line 150
Add input definition to action.yml with description
- Very specific: line 151
Add corresponding INPUT_* environment variable mapping in action.yml runs.steps
- Distinctive: line 152
Update README.md parameter tables
- Very specific: line 157
Keep parameter tables in README.md synchronized with action.yml
- Distinctive: line 159
Use clear examples for each feature
- Very specific: line 165
Default: DRONE_SSH_VERSION="1.8.4" in entrypoint.sh
- Distinctive: line 168
Update the default version when new drone-ssh releases are available.
≈ “Common” is an estimate: at least 1 in 5 of the 25,680 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is a GitHub Action for executing remote SSH commands. Built using a composite action pattern, it downloads and runs the drone-ssh binary (written in Go) to execute SSH commands on remote hosts.
Key characteristics:
- No local compilation required - downloads pre-built binaries from drone-ssh releases
- Shell-based composite action using
entrypoint.sh - Supports password and SSH key authentication, proxies, multiple hosts, and environment variable passing
- All input parameters are passed via
INPUT_*environment variables
Architecture
Execution Flow
- action.yml - GitHub Actions composite action definition
- Defines all input parameters and their descriptions
- Sets up environment variables with
INPUT_*prefix - Calls
entrypoint.sh
- entrypoint.sh - Main entry point
- Detects platform (Linux/Darwin/Windows) and architecture (amd64/arm64)
- Downloads appropriate
drone-sshbinary from GitHub releases - Executes the binary with all environment variables
- Handles
capture_stdoutfor output capture
- drone-ssh binary - The actual SSH client (separate Go project)
- Performs SSH connection and command execution
- Not part of this repository
Key Files
action.yml- Action metadata and input/output definitionsentrypoint.sh- Platform detection, binary download, and executiontestdata/- Test scripts and SSH keys for CI workflows.github/workflows/main.yml- Comprehensive test suite using Docker containers (tests./local action).github/workflows/stable.yml- Tests against publishedappleboy/ssh-action@v1tag.github/workflows/trivy-scan.yml- Automated security scanning for vulnerabilities and misconfigurations
Testing
Running Tests
Tests run automatically via GitHub Actions workflows. The test suite uses Docker containers running OpenSSH servers:
# Tests run automatically on push via .github/workflows/main.yml
# Tests create Docker containers with openssh-server and test various scenariosTest Categories (from main.yml)
The test workflow covers:
- default-user-name-password: Basic password authentication
- check-ssh-key: RSA key authentication, key priority over password
- support-key-passphrase: Encrypted SSH keys
- multiple-server: Multiple hosts with different ports
- support-ed25519-key: ED25519 key format
- testing-with-env: Environment variable passing,
allenvs, custom formats - testing06: IPv6 connectivity
- testing07: Special characters in passwords
- testing-capturing-output: Output capture functionality
- testing-script-stop: Script error handling with
set -e - testing-script-error: Error propagation
Testing Locally
Since this action downloads binaries, local testing should:
- Create a test SSH server (Docker or VM)
- Test
entrypoint.shdirectly with appropriateINPUT_*environment variables
Example:
export INPUT_HOST="192.168.1.100"
export INPUT_USERNAME="testuser"
export INPUT_PASSWORD="testpass"
export INPUT_PORT="22"
export INPUT_SCRIPT="whoami"
export GITHUB_ACTION_PATH="$(pwd)"
./entrypoint.shImportant Patterns
Script Execution
Users can provide scripts in two ways:
script: Inline commands (viaINPUT_SCRIPT)script_path: Path to a file in the repository (maps toINPUT_SCRIPT_FILEenv var - note the naming difference)
Error Handling
To stop execution on first error (mimics removed script_stop option), users should add set -e to their scripts:
script: |
#!/usr/bin/env bash
set -e
command1
command2Environment Variables
The action passes GitHub Action inputs as environment variables with INPUT_* prefix. The drone-ssh binary reads these to configure SSH behavior.
Special handling:
envs: Comma-separated list of environment variables to pass to remote scriptallenvs: Pass allGITHUB_*andINPUT_*variablesenvs_format: Custom format for environment variable export (e.g.,export TEST_{NAME}={VALUE})
Multiple Hosts
- Comma-separated hosts:
"host1,host2"(executes in parallel by default) - With custom ports:
"host1:2222,host2:5678" - Synchronous execution: Set
sync: true
Common Issues
Command Not Found
Non-interactive shells may skip .bashrc/.bash_profile. See README section "Command not found" for details. Solutions:
- Use absolute paths in commands
- Comment out early return in
/etc/bash.bashrc
OpenSSH Compatibility
Ubuntu 20.04+ may require enabling ssh-rsa algorithm in sshd_config:
CASignatureAlgorithms +ssh-rsaOr use ED25519 keys instead (preferred).
Development Guidelines
Adding New Parameters
- Add input definition to
action.ymlwith description - Add corresponding
INPUT_*environment variable mapping inaction.ymlruns.steps - Update README.md parameter tables
- The drone-ssh binary handles the actual parameter logic (separate repo)
Documentation
- Keep parameter tables in README.md synchronized with
action.yml - Maintain Chinese translations (README.zh-cn.md, README.zh-tw.md)
- Use clear examples for each feature
Version Management
The action pins to specific drone-ssh versions via:
- Default:
DRONE_SSH_VERSION="1.8.4"inentrypoint.sh - Override: Users can specify
versioninput parameter
Update the default version when new drone-ssh releases are available.
Release Process
This action uses semantic versioning with major version tags:
- Tags:
v1.0.0,v1.0.1, etc. - Major version tag:
v1(points to latest v1.x.x) - Users reference:
uses: appleboy/ssh-action@v1
GoReleaser config (.goreleaser.yaml) is present but set to skip: true since this action doesn't build Go code - it downloads pre-built binaries.
Trending
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about appleboy/ssh-action
- Stack Overflow“SSH to remote server in github actions”Stack Overflow · Oct 6, 2022 · 10 votes
- appleboy/scp-action“SCP Proxy Not working - SSH Handshake Failed”GitHub · Jun 30, 2020 · 7 reactions
- appleboy/scp-action“Support IPV6”GitHub · Apr 6, 2024 · 5 reactions
- actions/toolkit“Would github write a official ssh deploy actions,third party isn't good enough”GitHub · Oct 1, 2023 · 3 reactions
- Timothy191/Arch-System“build(deps): bump appleboy/ssh-action from 1.0.0 to 1.2.5”GitHub · Jun 18, 2026 · 2 reactions
The biggest 5 of 61 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 61
Talked about on GitHub and Stack Overflow (61 times).
On GitHub · 50
- Jun 30, 2020SCP Proxy Not working - SSH Handshake Failed — appleboy/scp-action7 reactions · 16 comments
- Apr 6, 2024Support IPV6 — appleboy/scp-action5 reactions · 3 comments
- Oct 1, 2023Would github write a official ssh deploy actions,third party isn't good enough — actions/toolkit3 reactions · 2 comments
- Jun 18, 2026build(deps): bump appleboy/ssh-action from 1.0.0 to 1.2.5 — Timothy191/Arch-System2 reactions · 1 comment
- Jun 3, 2026chore(deps): bump appleboy/ssh-action from 1.0.0 to 1.2.5 — Timothy191/ArchMK22 reactions · 3 comments
45 more on GitHub
- Feb 3, 2026chore(ci): bump appleboy/ssh-action from 1.2.0 to 1.2.5 — moshehbenavraham/Voice-Agent-PuPuPlatter2 reactions · 2 comments
- Sep 9, 2026chore(deps): bump the actions group with 2 updates — inryeok-office/GETI-Server-V11 reaction · 2 comments
- Aug 31, 2026ci: bump the github-actions group across 1 directory with 6 updates — Conecta-Seguros/api-gateway1 reaction · 3 comments
- Aug 10, 2026ci: bump the github-actions group across 1 directory with 7 updates — Conecta-Seguros/api-gateway1 reaction · 4 comments
- Aug 8, 2026ci(deps): bump appleboy/ssh-action from 1.0.3 to 1.2.5 — midnghtsapphire/neurooz1 reaction · 3 comments
- Aug 3, 2026ci: bump the github-actions group across 1 directory with 8 updates — Conecta-Seguros/api-gateway1 reaction · 4 comments
- Aug 3, 2026chore(deps): bump appleboy/ssh-action from 1.2.0 to 1.2.5 — tonglam/letletme-graphql1 reaction · 2 comments
- Jul 29, 2026ci: bump appleboy/ssh-action from 1.0.3 to 1.2.5 — Phile14augx/OPC_cerebro_hive1 reaction · 17 comments
- Jul 8, 2026chore(deps): bump appleboy/ssh-action from 1.2.0 to 1.2.5 — spawnperm/pk-business-os1 reaction · 1 comment
- Jul 6, 2026ci: bump the github-actions group across 1 directory with 7 updates — Conecta-Seguros/api-gateway1 reaction · 4 comments
- Jun 16, 2026ci: bump the github-actions group across 1 directory with 3 updates — Conecta-Seguros/api-gateway1 reaction · 4 comments
- May 3, 2026chore(deps): bump appleboy/ssh-action from 1.0.3 to 1.2.5 — elizaOS/eliza1 reaction · 1 comment
- Mar 20, 2026chore(deps): bump appleboy/ssh-action from 1.0.3 to 1.2.5 — nox-pie/shopsmart1 reaction · 1 comment
- Mar 20, 2026chore(mcp-servers): bump appleboy/ssh-action from 1.0.3 to 1.2.5 — milhy545/orchestration1 reaction · 9 comments
- Feb 2, 2026chore(deps): bump appleboy/ssh-action from 1.2.4 to 1.2.5 in the all-updates group — konsulin-care/konsulin-app1 reaction · 3 comments
- Feb 1, 2026chore(deps): bump appleboy/ssh-action from 1.2.4 to 1.2.5 in the minor-and-patch group — konsulin-care/konsulin-api1 reaction · 1 comment
- Jan 29, 2026Bump appleboy/ssh-action from 1.2.4 to 1.2.5 — SibeiC/api-server1 reaction · 1 comment
- Jan 28, 2026Build(deps): bump appleboy/ssh-action from 1.2.4 to 1.2.5 in the github-actions group — NaiDevOpsCom/nairobidevops.org-v21 reaction · 3 comments
- Jan 14, 2026Build(deps): bump appleboy/ssh-action from 1.2.0 to 1.2.4 in the github-actions group — NaiDevOpsCom/nairobidevops.org-v21 reaction · 4 comments
- Dec 1, 2025Bump appleboy/ssh-action from 1.2.3 to 1.2.4 — SibeiC/api-server1 reaction · 1 comment
- Nov 10, 2025Bump appleboy/ssh-action from 1.2.2 to 1.2.3 — SibeiC/api-server1 reaction · 1 comment
- Apr 18, 2022Secrets passed per env file can not be made available in SSH action — nektos/act1 reaction · 3 comments
- Apr 27, 2020ci(workflow): run script in headless mode on VMs — angristan/openvpn-install1 reaction · 1 comment
- Oct 25, 2026Bump appleboy/ssh-action from 1.2.0 to 1.2.5 — remus06/dev-ram0 reactions
- Oct 25, 2026build(deps): bump appleboy/ssh-action from 1.2.2 to 1.2.5 — mwhobrey/domi-ops0 reactions · 1 comment
- Oct 24, 2026build(deps): bump appleboy/ssh-action from 1.2.2 to 1.2.5 — truongnhatcuong/capfootball0 reactions
- Oct 21, 2026chore(actions): bump appleboy/ssh-action from 1.2.0 to 1.2.5 — nlp-labs-vietnam/investment-platform0 reactions · 2 comments
- Sep 23, 2026[chore] 배포·TLS 워크플로의 Actions 참조를 커밋 SHA 로 고정한다 — Afternote/Afternote-BE0 reactions
- Aug 2, 2026CI/CD Pipeline — renatobabata/language-quiz0 reactions
- Jun 1, 2026DO-008: GitHub Actions CD (SSH deploy) — no-money-freezion/freezino_python_api0 reactions
- Mar 23, 2026ci: bump the github-actions group across 1 directory with 4 updates — Conecta-Seguros/discovery-server0 reactions · 5 comments
- Mar 16, 2026ci: bump the github-actions group across 1 directory with 5 updates — Conecta-Seguros/discovery-server0 reactions · 5 comments
- Mar 9, 2026ci: bump the github-actions group across 1 directory with 4 updates — Conecta-Seguros/discovery-server0 reactions · 4 comments
- Feb 23, 2026ci: bump the github-actions group across 1 directory with 3 updates — Conecta-Seguros/discovery-server0 reactions · 4 comments
- Feb 19, 2026ci: bump appleboy/ssh-action from 1.0.3 to 1.2.5 in the github-actions group — Conecta-Seguros/discovery-server0 reactions · 4 comments
- Jan 29, 2026Github secretkeys autodeploy with ed25519 -> ssh.ParsePrivateKey: ssh: invalid openssh private key format — appleboy/scp-action0 reactions
- Jun 21, 2025[DevOps] [DEFECT] Stop CD action after ssh script fails — UoaWDCC/uasc-web0 reactions
- Dec 4, 2024Create Job Output Summary Using `$GITHUB_STEP_SUMMARY` and `appleboy/ssh-action`'s `capture_stdout` — go-cart-io/cartogram-docker0 reactions
- Oct 23, 2024Support execute local script over ssh — appleboy/drone-ssh0 reactions · 3 comments
- Oct 21, 2024[TROUBLE] github action CICD — ajou-JSL/Backend0 reactions
- Aug 26, 2024AWS Lightsail setup and CI/CD pipeline — nlp-tlp/15926-4-RDL-CITS32000 reactions · 1 comment
- Aug 1, 2024Dependency Dashboard — Vylpes/Droplet0 reactions
- Aug 1, 2024Dependency Dashboard — Vylpes/vylbot-app0 reactions
- Aug 1, 2024Dependency Dashboard — Vylpes/card-drop0 reactions
- Jun 28, 2024[ERROR / BUG] CD GithubACtions 작업 수정 — nerd-team-1/favorite-18-server0 reactions
On Stack Overflow · 11
- Oct 6, 2022SSH to remote server in github actions10 votes
- Sep 12, 2024Why are .env file or Github Action Secrets not working in CI/CD?2 votes
- Mar 17, 2023How do I SSH to a linux web app service in Azure via github workflow?2 votes · 3 answers
- Jul 10, 2022update code on a remote server with github2 votes · 1 answer
- Jan 11, 2024How to use npm install on an SSH machine in GitHub Actions1 vote
6 more on Stack Overflow
- Aug 23, 2021Deploying to GCloud VM Instances with GitHub Actions1 vote
- Mar 5, 2020Github Action for running Powershell scripts on remote Windows server1 vote · 1 answer
- Apr 16, 2023How to configure pm2 to trigger from github action0 votes
- Jan 24, 2023Github Actions Remote SSH to Digital Ocean VPS Issues0 votes · 1 answer
- Jan 18, 2023Github action deploying to lightsail has suddenly started failing with dial tcp i/o timeout0 votes · 1 answer
- Nov 8, 2019How to use ssh identity file with Github Actions0 votes · 1 answer
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

