Skip to content

tiyee/action-ssh

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Action SSH

Simple GitHub Action to run a command on a remote server using SSH. This is working with the latest GitHub Actions.

✨ Example Usage

Example using OpenSSH encrypted private key

      - 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 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 . 🚀

About

GitHub Actions for executing remote ssh commands.

Resources

License

Stars

Watchers

Forks

Packages

No packages published