All Projects → JimCronqvist → action-ssh

JimCronqvist / action-ssh

Licence: MIT license
GitHub Action for executing SSH commands on remote servers

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to action-ssh

latex-action
GitHub Action to compile LaTeX documents
Stars: ✭ 123 (+105%)
Mutual labels:  github-actions, github-action, github-actions-docker
assign-one-project-github-action
Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.
Stars: ✭ 140 (+133.33%)
Mutual labels:  github-actions, github-action, github-actions-docker
Github-Android-Action
Android Github Action that builds Android project, runs unit tests and generates debug APK, builds for Github Actions hackathon
Stars: ✭ 29 (-51.67%)
Mutual labels:  github-actions, github-action, github-actions-docker
intellij-platform-plugin-verifier-action
GitHub Action for executing the intellij-plugin-verifier
Stars: ✭ 20 (-66.67%)
Mutual labels:  github-actions, github-action, github-actions-docker
recent-activity
Add your recent activity to your profile readme!
Stars: ✭ 87 (+45%)
Mutual labels:  github-actions, github-action
nrwl-nx-action
A GitHub Action to wrap Nrwl Nx commands in your workflows.
Stars: ✭ 163 (+171.67%)
Mutual labels:  github-actions, github-action
slsa-provenance-action
Github Action implementation of SLSA Provenance Generation
Stars: ✭ 34 (-43.33%)
Mutual labels:  github-actions, github-action
action-netlify-deploy
🙌 Netlify deployments via GitHub actions
Stars: ✭ 32 (-46.67%)
Mutual labels:  github-actions, github-action
sentry-releases-action
A GitHub action that creates releases for Sentry.io.
Stars: ✭ 38 (-36.67%)
Mutual labels:  github-actions, github-action
metadata-action
GitHub Action to extract metadata (tags, labels) from Git reference and GitHub events for Docker
Stars: ✭ 492 (+720%)
Mutual labels:  github-actions, github-actions-docker
setup-jdk
(DEPRECATED) Set up your GitHub Actions workflow with a specific version of AdoptOpenJDK
Stars: ✭ 32 (-46.67%)
Mutual labels:  github-actions, github-action
action-github-workflow-sync
Github Action To Sync Github Action's Workflow Files Across Repositories
Stars: ✭ 51 (-15%)
Mutual labels:  github-actions, github-action
restrict-cursing-action
Github Action to prevent cursing and bad language in issues and pull requests
Stars: ✭ 20 (-66.67%)
Mutual labels:  github-actions, github-action
setup-bats
GitHub Action to setup BATS testing framework
Stars: ✭ 25 (-58.33%)
Mutual labels:  github-actions, github-action
clang-format-action
GitHub Action for clang-format checking
Stars: ✭ 48 (-20%)
Mutual labels:  github-actions, github-action
changed-files
Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
Stars: ✭ 733 (+1121.67%)
Mutual labels:  github-actions, github-action
clojure-dependency-update-action
A simple GitHub Actions job to create Pull Requests for outdated dependencies in clojure projects
Stars: ✭ 37 (-38.33%)
Mutual labels:  github-actions, github-action
googlejavaformat-action
GitHub Action that formats Java files following Google Style guidelines
Stars: ✭ 66 (+10%)
Mutual labels:  github-actions, github-action
django-github-digitalocean
Continuously Deploying Django to DigitalOcean with Docker and GitHub Actions
Stars: ✭ 45 (-25%)
Mutual labels:  github-actions, github-actions-docker
Github Pages Deploy Action
Automatically deploy your project to GitHub Pages using GitHub Actions. This action can be configured to push your production-ready code into any branch you'd like.
Stars: ✭ 2,507 (+4078.33%)
Mutual labels:  github-actions, github-action

GitHub Action - SSH Execute Commands

GitHub Action (yml) to execute SSH commands on remote server(s).

Supports:

  • Multiple hosts
  • Environment variables
  • Multiple commands
  • Private key authentication

Password authentication is generally seen as unsafe and is therefore not supported.

Example usage

Basic Example

- name: Execute SSH commmands on remote server
  uses: JimCronqvist/action-ssh@master
  with:
    hosts: '[email protected]'
    privateKey: ${{ secrets.PRIVATE_KEY }}
    command: ls -lah

Advanced Example - envs, multiple hosts, multiple commands

- name: Execute SSH commmands on remote server
  uses: JimCronqvist/action-ssh@master
  env:
    NAME: "Root"
  with:
    hosts: '[email protected] [email protected]:2222'
    privateKey: ${{ secrets.PRIVATE_KEY }}
    debug: false
    command: |
      ls -lah
      echo "I am $NAME"

Create your secrets here: https://github.com/USERNAME/REPO/settings/secrets

Inputs

command: Command(s) to execute on the remote server.

hosts: Hostname or IP address of the remote server(s). Separate multiple servers with a blank space. Example: "[email protected]:22 [email protected]:2222"

privateKey: The private key (id_rsa) content for authenticating to the SSH server(s). Recommended to store it as a GitHub Secret.

debug: Used to view all environment variables in the logs, please note that this could expose sensitive data. Default as false

Outputs

The output from the commands ran on the remote server(s).

External links

To set up ssh keys, please see the following guide: https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-1804

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].