Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
garygrossgarten committed Aug 30, 2019
1 parent 8e6ff35 commit d7e0a42
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
File renamed without changes.
50 changes: 47 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Github Action SSH
# GitHub Action SSH

This Project is being developed as a Javascript Github Action.
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).

Using [ssh2](https://github.com/mscdex/ssh2) via [node-ssh](https://github.com/steelbrain/node-ssh). 🚀
## ✨ Example Usage

**Example using OpenSSH encrypted private key**

```yml
- name: ls -a via ssh
uses: garygrossgarten/github-action-ssh@release
with:
command: ls -a
host: ${{ secrets.HOST }}
username: garygrossgarten
passphrase: ${{ secrets.PASSPHRASE }}
privateKey: ${{ secrets.PRIVATE_KEY}}
```
🔐 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.

**Result**

![result of example ssh workflow](result.png)

## Options

- **host** - _string_ - Hostname or IP address of the server. **Default:** `'localhost'`

- **port** - _integer_ - Port number of the server. **Default:** `22`

- **username** - _string_ - Username for authentication. **Default:** (none)

- **password** - _string_ - Password for password-based user authentication. **Default:** (none)

- **privateKey** - _mixed_ - _Buffer_ or _string_ that contains a private key for either key-based or hostbased user authentication (OpenSSH format). **Default:** (none)

- **passphrase** - _string_ - For an encrypted private key, this is the passphrase used to decrypt it. **Default:** (none)

- **tryKeyboard** - _boolean_ - Try keyboard-interactive user authentication if primary user authentication method fails. **Default:** `false`

## Development

---

This thing is build using Typescript and
[ssh2](https://github.com/mscdex/ssh2) (via [node-ssh](https://github.com/steelbrain/node-ssh)). 🚀
Binary file added result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d7e0a42

Please sign in to comment.