Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tiyee/action-ssh
GitHub Actions for executing remote ssh commands.
https://github.com/tiyee/action-ssh
Last synced: 8 days ago
JSON representation
GitHub Actions for executing remote ssh commands.
- Host: GitHub
- URL: https://github.com/tiyee/action-ssh
- Owner: tiyee
- License: mit
- Created: 2023-11-11T03:44:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-16T06:52:37.000Z (9 months ago)
- Last Synced: 2024-03-15T06:48:27.142Z (8 months ago)
- Language: TypeScript
- Size: 305 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Action SSH
Simple GitHub Action to run a command on a remote server using SSH. This is working with the latest [GitHub Actions](https://github.com/features/actions).
## ✨ Example Usage
**Example using OpenSSH encrypted private key**
```yml
- name: Action SSH
id: action-ssh
uses: tiyee/action-ssh@release
with:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
privateKey: ${{ secrets.PRIVATE_KEY }}
command: 'ls -alh'
```🔐 Set your secrets here: `https://github.com/USERNAME/REPO/settings/secrets`.
Check out [the workflow example](.github/workflows/ssh-example-workflow.yml) for a minimalistic yaml workflow in GitHub Actions.
## Options
- **host** - _string_ - Hostname or IP address of the server.
- **port** - _integer_ - Port number of the server. **Default:** `22`
- **username** - _string_ - Username for authentication.
- **privateKey** - _mixed_ - _Buffer_ or _string_ that contains a private key for either key-based or hostbased user authentication (OpenSSH format).
- **command** - _string_ - Your shell command
## Development
---
This thing is built using Typescript and
[ssh2](https://github.com/mscdex/ssh2) . 🚀