- Change "GitHub Action" to "A GitHub Action" for clarity.
- Update phrasing from "built using" to "built with" for consistency.
- Revise "Make sure to follow the below steps" to "Follow the steps below" for improved readability.
- Modify "best practice is create" to "It is best practice to create" for grammatical correctness.
- Change "Add newly generated key into Authorized keys" to "Add the newly generated key to the Authorized keys" for clarity.
- Update "Copy Private Key content and paste in Github Secrets" to "Copy the Private Key content and paste it into GitHub Secrets" for consistency.
- Change "install `clip` command" to "install the `clip` command" for grammatical correctness.
- Revise "See the detail information about" to "See detailed information about" for improved readability.
- Update "A note from one of our readers" to "Note: Depending on your version of SSH" for clarity.
- Change "Make sure that your key algorithm of choice is supported" to "Ensure that your chosen key algorithm is supported" for conciseness.
- Revise "Alternatively, `ed25519` keys are accepted by default" to "Alternatively, `ed25519` keys are accepted by default in OpenSSH" for clarity.
- Update "if you are running a command in a non interactive shell" to "If you are running a command in a non-interactive shell" for grammatical correctness.
Signed-off-by: appleboy <appleboy.tw@gmail.com>
[GitHub Action](https://github.com/features/actions) for executing remote SSH commands.
A [GitHub Action](https://github.com/features/actions) for executing remote SSH commands.


[](https://github.com/appleboy/ssh-action/actions/workflows/main.yml)
[](https://github.com/appleboy/ssh-action/actions/workflows/main.yml)
This project is built using [Golang](https://go.dev) and [drone-ssh](https://github.com/appleboy/drone-ssh). 🚀
This project is built with [Golang](https://go.dev) and [drone-ssh](https://github.com/appleboy/drone-ssh). 🚀
## Input variables
## Input variables
See [action.yml](./action.yml) for more detailed information.
Refer to [action.yml](./action.yml) for more detailed information.
Make sure that your key algorithm of choice is supported. On Ubuntu 20.04 or later you must explicitly allow the use of the ssh-rsa algorithm. Add the following line to your OpenSSH daemon file (which is either `/etc/ssh/sshd_config` or a drop-in file under `/etc/ssh/sshd_config.d/`):
Ensure that your chosen key algorithm is supported. On Ubuntu 20.04 or later, you must explicitly allow the use of the ssh-rsa algorithm. Add the following line to your OpenSSH daemon file (either `/etc/ssh/sshd_config` or a drop-in file under `/etc/ssh/sshd_config.d/`):
```bash
```bash
CASignatureAlgorithms +ssh-rsa
CASignatureAlgorithms +ssh-rsa
```
```
Alternatively, `ed25519` keys are accepted by default in OpenSSH. You could use this instead of rsa if needed:
Alternatively, `ed25519` keys are accepted by default in OpenSSH. You can use this instead of rsa if needed:
```bash
```bash
ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
@ -400,7 +400,7 @@ Now you can adjust you config:
See the [issue comment](https://github.com/appleboy/ssh-action/issues/31#issuecomment-1006565847) about interactive vs non interactive shell. Thanks @kocyigityunus for the solution.
See the [issue comment](https://github.com/appleboy/ssh-action/issues/31#issuecomment-1006565847) about interactive vs non interactive shell. Thanks @kocyigityunus for the solution.
Basically, if you are running a command in a non interactive shell, like ssh-action, on many linux distros,
If you are running a command in a non-interactive shell, like ssh-action, on many Linux distros,
`/etc/bash.bashrc` file has a specific command that returns only, so some of the files didn't run and some specific commands doesn't add to path,
`/etc/bash.bashrc` file has a specific command that returns only, so some of the files didn't run and some specific commands doesn't add to path,
@ -415,7 +415,7 @@ Basically, if you are running a command in a non interactive shell, like ssh-act
[ -z "$PS1" ] && return`
[ -z "$PS1" ] && return`
```
```
just comment out the line that returns early and everything should work fine, or you can use the real paths of the commands that you would like to use.
comment out the line that returns early, and everything should work fine. Alternatively, you can use the real paths of the commands you want to use.