All Projects → fifsky → ssh-action

fifsky / ssh-action

Licence: MIT license
🖥 github ssh action

Programming Languages

shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to ssh-action

blackcater
Using Node.js to generate my Github profile readme automatically.
Stars: ✭ 84 (-31.15%)
Mutual labels:  github-actions
rails7-on-docker
Working Rails 7 demo application without JavaScript bundling, running in Docker. No node.js or webpack.
Stars: ✭ 111 (-9.02%)
Mutual labels:  github-actions
mylib
Шаблон кросплатформенного CMake-проекта для языка C++ 🇬🇧 Modern CMake crossplatform project template for C++
Stars: ✭ 49 (-59.84%)
Mutual labels:  github-actions
pin-github-action
Pin your GitHub actions to a specific hash
Stars: ✭ 38 (-68.85%)
Mutual labels:  github-actions
creatly-backend
🚀 Creatly backend app
Stars: ✭ 71 (-41.8%)
Mutual labels:  github-actions
riak-haskell-client
A fast Haskell client library for the Riak decentralized data store
Stars: ✭ 48 (-60.66%)
Mutual labels:  github-actions
github-deploy-actions
This action will auto deploy to target branch when it get triggered
Stars: ✭ 24 (-80.33%)
Mutual labels:  github-actions
flatpak-github-actions
Build your Flatpak application using Github Actions
Stars: ✭ 73 (-40.16%)
Mutual labels:  github-actions
generate-og-image
Generate open graph images with Github Action from Markdown files
Stars: ✭ 32 (-73.77%)
Mutual labels:  github-actions
rubocop-linter-action
Rubocop Linter Action: A GitHub Action to run Rubocop against your code!
Stars: ✭ 86 (-29.51%)
Mutual labels:  github-actions
awscredswrap
awscredswrap uses temporary credentials for the specified iam role to set a shell environment variable or execute a command.
Stars: ✭ 15 (-87.7%)
Mutual labels:  github-actions
upload-rust-binary-action
GitHub Action for building and uploading Rust binary to GitHub Releases.
Stars: ✭ 47 (-61.48%)
Mutual labels:  github-actions
node-js-action-template
Template for new GitHub Actions running NodeJS
Stars: ✭ 33 (-72.95%)
Mutual labels:  github-actions
setup-arduino-cli
GitHub Action to setup Arduino CLI
Stars: ✭ 59 (-51.64%)
Mutual labels:  github-actions
action-eslint-fix
GitHub Action to run `eslint` with `--fix` option and commit fixes
Stars: ✭ 20 (-83.61%)
Mutual labels:  github-actions
nextjs-github-pages
🚀 Deploy a Next.js app to Github Pages via Github Actions.
Stars: ✭ 89 (-27.05%)
Mutual labels:  github-actions
actions
A Collection of GitHub Actions
Stars: ✭ 91 (-25.41%)
Mutual labels:  github-actions
mojito-admin-starter
此项目主要为了演示如何自动化 Fullstack project 的 Infrastructure。
Stars: ✭ 17 (-86.07%)
Mutual labels:  github-actions
setup-just
🤖 GitHub Action to install the just command runner
Stars: ✭ 21 (-82.79%)
Mutual labels:  github-actions
github-action-scp
⬆️ Copy a folder to a remote server using SSH
Stars: ✭ 123 (+0.82%)
Mutual labels:  github-actions

Remote SSH Commands

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

⭐️ SSH password are supported from version 0.0.3

Example Usage

Example using OpenSSH private key

- name: ls -a via ssh
  uses: fifsky/ssh-action@master
  with:
    command: |
      cd /tmp
      ls -a
    host: ${{ secrets.HOST }}
    user: root
    key: ${{ secrets.PRIVATE_KEY}}

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

Check out the workflow example for a minimalistic yaml workflow in GitHub Actions.

Result

result of example ssh workflow

Options

  • host - string - Hostname or IP address of the server. Default: 'localhost'

  • port - integer - Port number of the server. Default: 22

  • user - string - Username for authentication. Default: (root)

  • key - string - Required, that contains a private key for either key-based or hostbased user authentication (OpenSSH format). Default: (none)

  • pass - string - Password for authentication.

  • args - string - SSH parameters for example: -tt.

Password and Private Key can only be configured one item

If you need to add some extra SSH parameters, you can setting the args option.

For example, add -tt parameter to solve: #4

Pseudo-terminal will not be allocated because stdin is not a terminal.

Tips

If emitting "mesg: ttyname failed: Inappropriate ioctl for device", You need to modify your Linux files as follows

vim /root/.profile
// Modify the "mesg n || true"  to "tty -s && mesg n || true"

Thanks

Documentation and parameters design from: https://github.com/garygrossgarten/github-action-ssh

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