Compare commits

..

26 Commits

Author SHA1 Message Date
Bo-Yi Wu
8f94919856
chore: update appleboy/ssh-action to v1.0.1 in documentation
- Update appleboy/ssh-action from v1.0.0 to v1.0.1 in README.md
- Update appleboy/ssh-action from v0.1.10 to v1.0.1 in README.zh-tw.md

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-12-26 15:13:15 +08:00
Bo-Yi Wu
2344d97573
chore(security): update drone-ssh to v1.7.1 (#286)
- Update the base image in Dockerfile from `1.7.0` to `1.7.1`
- Change the location of `entrypoint.sh` from root to `/bin/` directory in Dockerfile
- Remove the explicit `chmod +x` command for `entrypoint.sh` in Dockerfile

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-12-26 15:11:53 +08:00
Bo-Yi Wu
b9f6bf6223
style: refine CI Workflow and Test Configurations
- Remove empty lines from the GitHub Actions CI workflow file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-12-26 15:07:39 +08:00
appleboy
4330a1ea48 docs: update appleboy/ssh-action version in README
- Update the version of `appleboy/ssh-action` from `v0.2.0` to `v1.0.0` in multiple places in the README.

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2023-07-23 10:05:56 +08:00
appleboy
55dabf81b4 docs: update appleboy/ssh-action version in README
- Update the version of `appleboy/ssh-action` from `v0.1.10` to `v0.2.0` in multiple places in the README file.

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2023-07-23 10:01:08 +08:00
appleboy
8d9094f3b1 docs: "Introduce allenvs option for shell script execution"
- Add a new option `allenvs` in the README to pass all environment variables to the shell script.

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2023-07-23 09:57:59 +08:00
Bo-Yi Wu
5ac43dd762
chore(ssh): pass all ENV variables to script (#259) 2023-07-23 09:53:20 +08:00
Bo-Yi Wu
a01d3ea1df chore: improve performance and test coverage across OSs
- Update the Dockerfile to use drone-ssh version 1.6.14

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-06-04 16:30:25 +08:00
Bo-Yi Wu
c7d850f6cd docs: improve readability and functionality across project
- Reformat input parameters in README.md as a table for better readability

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-06-04 11:08:59 +08:00
Bo-Yi Wu
f579d71942 chore: improve action.yml clarity and update default values
- Update descriptions for input fields in action.yml for better clarity
- Change default values for SSH port and SSH proxy port to string format

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-06-04 11:06:25 +08:00
Bo-Yi Wu
d87d276960
ci: add Docker login and pull job to CI pipeline (#244)
- Add a new job named "testing04" for docker login and pull in ci.yml file.

ref: https://github.com/appleboy/ssh-action/issues/230
2023-04-18 09:31:39 +08:00
Bo-Yi Wu
3130c7a2bc
ci: improve CI workflow for private repository cloning (#241)
- Add a new job for git clone and pull in CI
- Clone a private repository in CI with secrets
- Remove a directory in the cloned repository

ref: https://github.com/appleboy/ssh-action/issues/65
2023-04-13 14:38:24 +08:00
Bo-Yi Wu
2b7de38eed chore: update appleboy/ssh-action to latest version
- Update the version of `appleboy/ssh-action` from `v0.1.9` to `v0.1.10` in multiple files.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-04-13 12:18:50 +08:00
Bo-Yi Wu
334f9259f2
chore: update action configuration for greater flexibility (#240)
- Update base image version from `1.6.12` to `1.6.13` in Dockerfile
- Add `envs_format` input with flexible configuration in action.yml
- Add a line to README.md pointing to action.yml for more information

fix https://github.com/appleboy/ssh-action/issues/213
2023-04-13 11:15:42 +08:00
Bo-Yi.Wu
6268c80dd6 docs: add external resources to README file
- Add a line linking to Golang and drone-ssh in the README file

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2023-04-04 17:56:49 +08:00
Bo-Yi.Wu
5f64c95280 chore: improve SSH key handling and documentation
- Upgrade the ssh-action package from version `v0.1.8` to `v0.1.9`
- Update the ssh-keygen command to use `-t ed25519 -a 200 -C` flag with an email address
- Clarify how to pass environment variables as strings in the `env` object
- Add a command to check the fingerprint of an ed25519 key in the README
- Remove duplicate Host entry for `FooServer` in the Chinese version of the README

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2023-04-04 17:37:29 +08:00
Bo-Yi Wu
3cd1bcf771
feat: refactor code for parallel execution on multiple hosts (#237)
- Update Dockerfile to use a newer version of `drone-ssh`
- Modify `ci.yml` to use `continue-on-error` instead of commenting out code

fix https://github.com/appleboy/ssh-action/issues/233
2023-04-04 17:25:53 +08:00
Bo-Yi Wu
6a1b59d972 docs: add chinese 2023-03-03 10:45:48 +08:00
Bo-Yi Wu
e4a881008d docs(readme): update 2023-03-03 10:26:23 +08:00
Bo-Yi Wu
51b83ba474 docs: format 2023-03-03 10:22:51 +08:00
Bo-Yi.Wu
495830820f docs: add traditional chinese documentation.
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2023-02-28 18:12:19 +08:00
Bo-Yi.Wu
b601429988 docs: update to v0.1.8 version
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2023-02-28 17:18:27 +08:00
Bo-Yi.Wu
ae2bb3c3dc chore(docker): update appleboy/drone-ssh to v1.6.10 version
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2023-02-28 17:16:13 +08:00
Bo-Yi Wu
7bf58514db
chore(auth): allow set password and private key at same time. (#226) 2023-02-28 17:11:47 +08:00
Bo-Yi.Wu
c1965ddd25 docs: upgrade to v0.1.7
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2023-01-08 09:13:12 +08:00
Bo-Yi Wu
d91a1af6f5
Fix(envs): set environment variable instead of bash variable (#209) 2023-01-08 09:08:14 +08:00
12 changed files with 714 additions and 374 deletions

View File

@ -6,140 +6,128 @@ env:
BAR: "FOO" BAR: "FOO"
jobs: jobs:
testing01:
build: name: default flag testing
name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v1 uses: actions/checkout@v1
- name: executing remote ssh commands using password - name: correct password but wrong key
uses: ./ uses: ./
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }} password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }} key: "1234"
script: whoami port: ${{ secrets.PORT }}
script: whoami
- name: executing remote ssh commands using ssh key - name: wrong password but correct key
uses: ./ uses: ./
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }} password: "abcdef"
port: ${{ secrets.PORT }} key: ${{ secrets.KEY }}
script: whoami port: ${{ secrets.PORT }}
script: whoami
- name: multiple command - name: executing remote ssh commands using password
uses: ./ uses: ./
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }} password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }} port: ${{ secrets.PORT }}
script: | script: whoami
whoami
ls -al
# - name: stop script if command error - name: executing remote ssh commands using ssh key
# if: always() uses: ./
# uses: ./ with:
# with: host: ${{ secrets.HOST }}
# host: ${{ secrets.HOST }} username: ${{ secrets.USERNAME }}
# username: ${{ secrets.USERNAME }} key: ${{ secrets.KEY }}
# key: ${{ secrets.KEY }} port: ${{ secrets.PORT }}
# port: ${{ secrets.PORT }} script: whoami
# script_stop: true
# script: |
# mkdir abc/def
# ls -al
- name: pass environment - name: multiple command
uses: ./ uses: ./
env: with:
FOO: "BAR" host: ${{ secrets.HOST }}
with: username: ${{ secrets.USERNAME }}
host: ${{ secrets.HOST }} key: ${{ secrets.KEY }}
username: ${{ secrets.USERNAME }} port: ${{ secrets.PORT }}
key: ${{ secrets.KEY }} script: |
port: ${{ secrets.PORT }} whoami
envs: FOO ls -al
script: |
echo "I am $FOO, thanks"
echo "I am $BAR, thanks"
- name: pass multiple environment - name: stop script if command error
uses: ./ uses: ./
env: continue-on-error: true
FOO: "BAR" with:
BAR: "FOO" host: ${{ secrets.HOST }}
SHA: ${{ github.sha }} username: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }} key: ${{ secrets.KEY }}
with: port: ${{ secrets.PORT }}
host: ${{ secrets.HOST }} script_stop: true
username: ${{ secrets.USERNAME }} sync: true
key: ${{ secrets.KEY }} debug: true
port: ${{ secrets.PORT }} script: |
envs: FOO,BAR,SHA,PORT mkdir abc/def
script: | ls -al
echo "I am $FOO, thanks"
echo "I am $BAR, thanks"
echo "sha: $SHA"
echo "port: $PORT"
- name: ssh key passphrase - name: ssh key passphrase
uses: ./ uses: ./
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH2 }} key: ${{ secrets.SSH2 }}
port: ${{ secrets.PORT }} port: ${{ secrets.PORT }}
passphrase: ${{ secrets.PASSPHRASE }} passphrase: ${{ secrets.PASSPHRASE }}
script: | script: |
whoami whoami
ls -al ls -al
- name: use insecure cipher - name: use insecure cipher
uses: ./ uses: ./
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }} password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }} port: ${{ secrets.PORT }}
script: | script: |
ls \ ls \
-lah -lah
use_insecure_cipher: true use_insecure_cipher: true
# https://github.com/appleboy/ssh-action/issues/75#issuecomment-668314271 # https://github.com/appleboy/ssh-action/issues/75#issuecomment-668314271
- name: Multiline SSH commands interpreted as single lines - name: Multiline SSH commands interpreted as single lines
uses: ./ uses: ./
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }} password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }} port: ${{ secrets.PORT }}
script_stop: true script_stop: true
script: | script: |
ls \ ls \
-lah -lah
use_insecure_cipher: true use_insecure_cipher: true
# https://github.com/appleboy/ssh-action/issues/85 # https://github.com/appleboy/ssh-action/issues/85
- name: Deployment to multiple hosts with different ports - name: Deployment to multiple hosts with different ports
uses: ./ uses: ./
with: with:
host: "${{ secrets.HOST }}:${{ secrets.PORT }}" host: "${{ secrets.HOST }}:${{ secrets.PORT }}"
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }} password: ${{ secrets.PASSWORD }}
port: 1024 port: 1024
script_stop: true script_stop: true
script: | script: |
ls \ ls \
-lah -lah
use_insecure_cipher: true use_insecure_cipher: true
# - name: SSH ED25519 Private Key # - name: SSH ED25519 Private Key
# uses: ./ # uses: ./
@ -149,3 +137,127 @@ jobs:
# key: ${{ secrets.ID_ED25519 }} # key: ${{ secrets.ID_ED25519 }}
# port: ${{ secrets.TUNNEL_PORT }} # port: ${{ secrets.TUNNEL_PORT }}
# script: whoami # script: whoami
testing02:
name: testing with envs
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: pass environment
uses: ./
env:
FOO: "BAR"
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
envs: FOO
script: |
echo "I am $FOO, thanks"
echo "I am $BAR, thanks"
- name: pass multiple environment
uses: ./
env:
FOO: "BAR"
BAR: "FOO"
SHA: ${{ github.sha }}
PORT: ${{ secrets.PORT }}
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
envs: FOO,BAR,SHA,PORT
script: |
echo "I am $FOO, thanks"
echo "I am $BAR, thanks"
echo "sha: $SHA"
echo "port: $PORT"
sh test.sh
- name: custom envs format
uses: ./
env:
FOO: "BAR"
AAA: "BBB"
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
envs: FOO,BAR,AAA
envs_format: export TEST_{NAME}={VALUE}
script: |
echo "I am $TEST_FOO, thanks"
echo "I am $TEST_BAR, thanks"
echo "I am $BAR, thanks"
echo "I am $TEST_AAA, thanks"
- name: pass all ENV variables to script
uses: ./
env:
INPUT_FOO: "BAR"
INPUT_AAA: "BBB"
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
allenvs: true
script: |
echo "I am $INPUT_FOO, thanks"
echo "I am $INPUT_AAA, thanks"
echo "$GITHUB_BASE_REF"
echo "$GITHUB_REF"
testing03:
name: git clone and pull
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: clone private repository
uses: ./
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script_stop: true
script: |
git clone https://appleboy:${{ secrets.TEST_TOKEN }}@github.com/go-training/self-runner.git test_repository
rm -rf test_repository
testing04:
name: docker login and pull
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: login GitHub Container Registry
uses: ./
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script_stop: true
script: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u github.actor --password-stdin
- name: login DockerHub Container Registry
uses: ./
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script_stop: true
script: |
echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin

View File

@ -1,31 +0,0 @@
name: Testing
on:
push:
pull_request:
jobs:
testing:
runs-on: ubuntu-latest
container: golang:1.20-alpine
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: setup sshd server
run: |
apk add git make curl perl bash build-base zlib-dev ucl-dev
make ssh-server
- name: executing remote ssh commands using password
uses: ./
with:
host: 127.0.0.1
username: drone-ssh
password: 1234
port: 22
script: whoami
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3

View File

@ -1,5 +1,5 @@
FROM appleboy/drone-ssh:1.6.5-linux-amd64 FROM ghcr.io/appleboy/drone-ssh:1.7.1
COPY entrypoint.sh /entrypoint.sh COPY entrypoint.sh /bin/entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/bin/entrypoint.sh"]

View File

@ -1,15 +0,0 @@
ssh-server:
adduser -h /home/drone-ssh -s /bin/sh -D -S drone-ssh
echo drone-ssh:1234 | chpasswd
mkdir -p /home/drone-ssh/.ssh
chmod 700 /home/drone-ssh/.ssh
cat tests/.ssh/id_rsa.pub >> /home/drone-ssh/.ssh/authorized_keys
cat tests/.ssh/test.pub >> /home/drone-ssh/.ssh/authorized_keys
chmod 600 /home/drone-ssh/.ssh/authorized_keys
chown -R drone-ssh /home/drone-ssh/.ssh
# install ssh and start server
apk add --update openssh openrc
rm -rf /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_dsa_key
sed -i 's/^#PubkeyAuthentication yes/PubkeyAuthentication yes/g' /etc/ssh/sshd_config
sed -i 's/AllowTcpForwarding no/AllowTcpForwarding yes/g' /etc/ssh/sshd_config
./tests/entrypoint.sh /usr/sbin/sshd -D &

136
README.md
View File

@ -1,5 +1,7 @@
# 🚀 SSH for GitHub Actions # 🚀 SSH for GitHub Actions
[繁體中文](./README.zh-tw.md)
[GitHub Action](https://github.com/features/actions) for executing remote ssh commands. [GitHub Action](https://github.com/features/actions) for executing remote ssh commands.
![ssh workflow](./images/ssh-workflow.png) ![ssh workflow](./images/ssh-workflow.png)
@ -8,41 +10,44 @@
**Important**: Only support **Linux** [docker](https://www.docker.com/) container. **Important**: Only support **Linux** [docker](https://www.docker.com/) container.
This thing is built using [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. See [action.yml](./action.yml) for more detailed information.
* `host` - ssh host | Input Parameter | Description | Default Value |
* `port` - ssh port, default is `22` |-------------------------|-----------------------------------------------------------------|---------------|
* `username` - ssh username | host | SSH host address | |
* `password` - ssh password | port | SSH port number | 22 |
* `passphrase` - the passphrase is usually to encrypt the private key | passphrase | SSH key passphrase | |
* `sync` - synchronous execution if multiple hosts, default is false | username | SSH username | |
* `timeout` - timeout for ssh to remote host, default is `30s` | password | SSH password | |
* `command_timeout` - timeout for ssh command, default is `10m` | sync | Enable synchronous execution if multiple hosts | false |
* `key` - content of ssh private key. ex raw content of ~/.ssh/id_rsa, remember include the BEGIN and END lines | use_insecure_cipher | Include more ciphers with use_insecure_cipher | false |
* `key_path` - path of ssh private key | cipher | Allowed cipher algorithms. If unspecified, a sensible default | |
* `fingerprint` - fingerprint SHA256 of the host public key, default is to skip verification | timeout | Timeout duration for SSH to host | 30s |
* `script` - execute commands | command_timeout | Timeout duration for SSH command | 10m |
* `script_stop` - stop script after first failure | key | Content of SSH private key. e.g., raw content of ~/.ssh/id_rsa | |
* `envs` - pass environment variable to shell script | key_path | Path of SSH private key | |
* `debug` - enable debug mode | fingerprint | SHA256 fingerprint of the host public key | |
* `use_insecure_cipher` - include more ciphers with use_insecure_cipher (see [#56](https://github.com/appleboy/ssh-action/issues/56)) | proxy_host | SSH proxy host | |
* `cipher` - the allowed cipher algorithms. If unspecified then a sensible | proxy_port | SSH proxy port | 22 |
| proxy_username | SSH proxy username | |
SSH Proxy Setting: | proxy_password | SSH proxy password | |
| proxy_passphrase | SSH proxy key passphrase | |
* `proxy_host` - proxy host | proxy_timeout | Timeout for SSH to proxy host | 30s |
* `proxy_port` - proxy port, default is `22` | proxy_key | Content of SSH proxy private key | |
* `proxy_username` - proxy username | proxy_key_path | Path of SSH proxy private key | |
* `proxy_password` - proxy password | proxy_fingerprint | SHA256 fingerprint of the proxy host public key | |
* `proxy_passphrase` - the passphrase is usually to encrypt the private key | proxy_cipher | Allowed cipher algorithms for the proxy | |
* `proxy_timeout` - timeout for ssh to proxy host, default is `30s` | proxy_use_insecure_cipher | Include more ciphers with use_insecure_cipher for the proxy | false |
* `proxy_key` - content of ssh proxy private key. | script | Execute commands | |
* `proxy_key_path` - path of ssh proxy private key | script_stop | Stop script after first failure | false |
* `proxy_fingerprint` - fingerprint SHA256 of the proxy host public key, default is to skip verification | envs | Pass environment variables to shell script | |
* `proxy_use_insecure_cipher` - include more ciphers with use_insecure_cipher (see [#56](https://github.com/appleboy/ssh-action/issues/56)) | envs_format | Flexible configuration of environment value transfer | |
* `proxy_cipher` - the allowed cipher algorithms. If unspecified then a sensible | debug | Enable debug mode | false |
| allenvs | Pass all environment variables to shell script | false |
## Usage ## Usage
@ -58,7 +63,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: executing remote ssh commands using password - name: executing remote ssh commands using password
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v1.0.1
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -85,76 +90,46 @@ Make sure to follow the below steps while creating SSH Keys and using them.
The best practice is create the SSH Keys on local machine not remote machine. The best practice is create the SSH Keys on local machine not remote machine.
Login with username specified in Github Secrets. Generate a RSA Key-Pair: Login with username specified in Github Secrets. Generate a RSA Key-Pair:
<details> ### Generate rsa key
<summary>rsa</summary>
<p>
```bash ```bash
ssh-keygen -t rsa -b 4096 -C "your_email@example.com" ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
``` ```
</p> ### Generate ed25519 key
</details>
<details>
<summary>ed25519</summary>
<p>
```bash ```bash
ssh-keygen -t ed25519 -a 200 -C "your_email@example.com" ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
``` ```
</p>
</details>
Add newly generated key into Authorized keys. Read more about authorized keys [here](https://www.ssh.com/ssh/authorized_keys/). Add newly generated key into Authorized keys. Read more about authorized keys [here](https://www.ssh.com/ssh/authorized_keys/).
<details> ### Add rsa key into Authorized keys
<summary>rsa</summary>
<p>
```bash ```bash
cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys' cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
``` ```
</p> ### Add ed25519 key into Authorized keys
</details>
<details>
<summary>ed25519</summary>
<p>
```bash ```bash
cat .ssh/id_ed25519.pub | ssh b@B 'cat >> .ssh/authorized_keys' cat .ssh/id_ed25519.pub | ssh b@B 'cat >> .ssh/authorized_keys'
``` ```
</p>
</details>
Copy Private Key content and paste in Github Secrets. Copy Private Key content and paste in Github Secrets.
<details> ### Copy rsa Private key
<summary>rsa</summary>
<p>
```bash ```bash
clip < ~/.ssh/id_rsa clip < ~/.ssh/id_rsa
``` ```
</p> ### Copy ed25519 Private key
</details>
<details>
<summary>ed25519</summary>
<p>
```bash ```bash
clip < ~/.ssh/id_ed25519 clip < ~/.ssh/id_ed25519
``` ```
</p>
</details>
See the detail information about [SSH login without password](http://www.linuxproblem.org/art_9.html). See the detail information about [SSH login without password](http://www.linuxproblem.org/art_9.html).
**A note** from one of our readers: Depending on your version of SSH you might also have to do the following changes: **A note** from one of our readers: Depending on your version of SSH you might also have to do the following changes:
@ -171,8 +146,7 @@ If you are currently using OpenSSH and are getting the following error:
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey]
``` ```
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 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/`):
`/etc/ssh/sshd_config.d/`):
```bash ```bash
CASignatureAlgorithms +ssh-rsa CASignatureAlgorithms +ssh-rsa
@ -190,7 +164,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml ```yaml
- name: executing remote ssh commands using password - name: executing remote ssh commands using password
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v1.0.1
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -203,7 +177,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml ```yaml
- name: executing remote ssh commands using ssh key - name: executing remote ssh commands using ssh key
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v1.0.1
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -216,7 +190,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```yaml ```yaml
- name: multiple command - name: multiple command
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v1.0.1
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -233,7 +207,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff ```diff
- name: multiple host - name: multiple host
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v1.0.1
with: with:
- host: "foo.com" - host: "foo.com"
+ host: "foo.com,bar.com" + host: "foo.com,bar.com"
@ -249,7 +223,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff ```diff
- name: multiple host - name: multiple host
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v1.0.1
with: with:
- host: "foo.com" - host: "foo.com"
+ host: "foo.com:1234,bar.com:5678" + host: "foo.com:1234,bar.com:5678"
@ -264,7 +238,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff ```diff
- name: multiple host - name: multiple host
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v1.0.1
with: with:
host: "foo.com,bar.com" host: "foo.com,bar.com"
+ sync: true + sync: true
@ -280,7 +254,7 @@ ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```diff ```diff
- name: pass environment - name: pass environment
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v1.0.1
+ env: + env:
+ FOO: "BAR" + FOO: "BAR"
+ BAR: "FOO" + BAR: "FOO"
@ -305,7 +279,7 @@ _Inside `env` object, you need to pass every environment variable as a string, p
```diff ```diff
- name: stop script if command error - name: stop script if command error
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v1.0.1
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -358,7 +332,7 @@ Host FooServer
```diff ```diff
- name: ssh proxy command - name: ssh proxy command
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v1.0.1
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -381,7 +355,7 @@ It is not uncommon for files to leak from backups or decommissioned hardware, an
```diff ```diff
- name: ssh key passphrase - name: ssh key passphrase
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v1.0.1
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}
@ -407,7 +381,7 @@ Now you can adjust you config:
```diff ```diff
- name: ssh key passphrase - name: ssh key passphrase
uses: appleboy/ssh-action@v0.1.6 uses: appleboy/ssh-action@v1.0.1
with: with:
host: ${{ secrets.HOST }} host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }} username: ${{ secrets.USERNAME }}

393
README.zh-tw.md Normal file
View File

@ -0,0 +1,393 @@
# 🚀 用於 GitHub Actions 的 SSH
[GitHub Action](https://github.com/features/actions) for executing remote ssh commands.
![ssh workflow](./images/ssh-workflow.png)
[![Actions Status](https://github.com/appleboy/ssh-action/workflows/remote%20ssh%20command/badge.svg)](https://github.com/appleboy/ssh-action/actions)
**注意** 只支援在 **Linux** [docker](https://www.docker.com/) 容器上執行。
## 輸入變數
更詳細的資訊,請參閱 [action.yml](./action.yml)。
* `host` - SSH 主機
* `port` - SSH 連接埠,預設為 `22`
* `username` - SSH 使用者名稱
* `password` - SSH 密碼
* `passphrase` - 通常用於加密私鑰的 passphrase
* `sync` - 同步執行多個主機上的命令,預設為 false
* `timeout` - SSH 連接到遠端主機的超時時間,預設為 `30s`
* `command_timeout` - SSH 命令超時時間,預設為 10m
* `key` - SSH 私鑰的內容,例如 ~/.ssh/id_rsa 的原始內容,請記得包含 BEGIN 和 END 行
* `key_path` - SSH 私鑰的路徑
* `fingerprint` - 主機公鑰的 SHA256 指紋,預設為略過驗證
* `script` - 執行命令
* `script_stop` - 當出現第一個錯誤時停止執行命令
* `envs` - 傳遞環境變數到 shell script
* `debug` - 啟用偵錯模式
* `use_insecure_cipher` - 使用不安全的密碼ciphers進行加密參見 [#56](https://github.com/appleboy/ssh-action/issues/56)
* `cipher` - 允許使用的密碼ciphers演算法。如果未指定則使用適當的演算法
SSH 代理設置:
* `proxy_host` - 代理主機
* `proxy_port` - 代理端口,預設為 `22`
* `proxy_username` - 代理使用者名稱
* `proxy_password` - 代理密碼
* `proxy_passphrase` - 密碼通常用於加密私有金鑰
* `proxy_timeout` - SSH 連線至代理主機的逾時時間,預設為 `30s`
* `proxy_key` - SSH 代理私有金鑰內容
* `proxy_key_path` - SSH 代理私有金鑰路徑
* `proxy_fingerprint` - 代理主機公鑰的 SHA256 指紋,預設為跳過驗證
* `proxy_use_insecure_cipher` - 使用不安全的加密方式,請參閱 [#56](https://github.com/appleboy/ssh-action/issues/56)
* `proxy_cipher` - 允許的加密算法。如果未指定,則使用合理的算法
## 使用方式
執行遠端 SSH 命令
```yaml
name: remote ssh command
on: [push]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v1.0.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: whoami
```
畫面輸出
```sh
======CMD======
whoami
======END======
out: ***
==============================================
✅ Successfully executed commands to all host.
==============================================
```
### 設置 SSH 金鑰
請在創建 SSH 金鑰並使用 SSH 金鑰時遵循以下步驟。最佳做法是在本地機器上創建 SSH 金鑰而不是遠端機器上。請使用 Github Secrets 中指定的用戶名登錄。生成 RSA 金鑰:
### 生成 RSA 金鑰
```bash
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
```
### 生成 ed25519 金鑰
```bash
ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```
將新生成的金鑰添加到已授權的金鑰中。詳細了解已授權的金鑰請點擊[此處](https://www.ssh.com/ssh/authorized_keys/).
### 將 RSA 金鑰添加到已授權金鑰中
```bash
cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
```
### 將 ed25519 金鑰添加到已授權金鑰中
```bash
cat .ssh/id_ed25519.pub | ssh b@B 'cat >> .ssh/authorized_keys'
```
複製私鑰內容,然後將其粘貼到 Github Secrets 中。
### 複製 rsa 私鑰內容
```bash
clip < ~/.ssh/id_rsa
```
### 複製 ed25519 私鑰內容
```bash
clip < ~/.ssh/id_ed25519
```
有關無需密碼登錄 SSH 的詳細信息,請[參見該網站](http://www.linuxproblem.org/art_9.html)。
**來自讀者的注意事項** 根據您的 SSH 版本,您可能還需要進行以下更改:
* 將公鑰放在 `.ssh/authorized_keys2`
* 將 `.ssh` 的權限更改為700
* 將 `.ssh/authorized_keys2` 的權限更改為640
### 如果你使用的是 OpenSSH
如果您正在使用 OpenSSH並出現以下錯誤
```bash
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey]
```
請確保您所選擇的密鑰演算法得到支援。在 Ubuntu 20.04 或更高版本上,您必須明確允許使用 SSH-RSA 演算法。請在 OpenSSH 守護進程文件中添加以下行(它可以是 `/etc/ssh/sshd_config``/etc/ssh/sshd_config.d/` 中的一個附著文件):
```bash
CASignatureAlgorithms +ssh-rsa
```
或者,`Ed25519` 密鑰在 OpenSSH 中默認被接受。如果需要,您可以使用它來替代 RSA。
```bash
ssh-keygen -t ed25519 -a 200 -C "your_email@example.com"
```
### Example
#### 使用密碼執行遠端 SSH 命令
```yaml
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v1.0.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: whoami
```
#### 使用私鑰
```yaml
- name: executing remote ssh commands using ssh key
uses: appleboy/ssh-action@v1.0.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: whoami
```
#### 多個命令
```yaml
- name: multiple command
uses: appleboy/ssh-action@v1.0.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
whoami
ls -al
```
![result](./images/output-result.png)
#### 多台主機
```diff
- name: multiple host
uses: appleboy/ssh-action@v1.0.1
with:
- host: "foo.com"
+ host: "foo.com,bar.com"
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
whoami
ls -al
```
#### 多個不同端口的主機
```diff
- name: multiple host
uses: appleboy/ssh-action@v1.0.1
with:
- host: "foo.com"
+ host: "foo.com:1234,bar.com:5678"
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
whoami
ls -al
```
#### 在多個主機上同步執行
```diff
- name: multiple host
uses: appleboy/ssh-action@v1.0.1
with:
host: "foo.com,bar.com"
+ sync: true
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
script: |
whoami
ls -al
```
#### 將環境變量傳遞到 Shell 腳本
```diff
- name: pass environment
uses: appleboy/ssh-action@v1.0.1
+ env:
+ FOO: "BAR"
+ BAR: "FOO"
+ SHA: ${{ github.sha }}
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
+ envs: FOO,BAR,SHA
script: |
echo "I am $FOO"
echo "I am $BAR"
echo "sha: $SHA"
```
_在 `env` 對象中,您需要將每個環境變量作為字符串傳遞,傳遞 `Integer` 數據類型或任何其他類型可能會產生意外結果。_
#### 在第一次失敗後停止腳本
> ex: missing `abc` folder
```diff
- name: stop script if command error
uses: appleboy/ssh-action@v1.0.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
+ script_stop: true
script: |
mkdir abc/def
ls -al
```
畫面輸出:
```sh
======CMD======
mkdir abc/def
ls -al
======END======
2019/11/21 01:16:21 Process exited with status 1
err: mkdir: cannot create directory abc/def: No such file or directory
##[error]Docker run failed with exit code 1
```
#### 如何使用 `ProxyCommand` 連接遠程服務器?
```bash
+--------+ +----------+ +-----------+
| Laptop | <--> | Jumphost | <--> | FooServer |
+--------+ +----------+ +-----------+
```
在您的 `~/.ssh/config` 文件中,您會看到以下內容。
```bash
Host Jumphost
HostName Jumphost
User ubuntu
Port 22
IdentityFile ~/.ssh/keys/jump_host.pem
Host FooServer
HostName FooServer
User ubuntu
Port 22
ProxyCommand ssh -q -W %h:%p Jumphost
```
#### 如何將其轉換為 GitHubActions 的 YAML 格式?
```diff
- name: ssh proxy command
uses: appleboy/ssh-action@v1.0.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
+ proxy_host: ${{ secrets.PROXY_HOST }}
+ proxy_username: ${{ secrets.PROXY_USERNAME }}
+ proxy_key: ${{ secrets.PROXY_KEY }}
+ proxy_port: ${{ secrets.PROXY_PORT }}
script: |
mkdir abc/def
ls -al
```
#### 如何保護私鑰?
密碼短語通常用於加密私鑰。這使得攻擊者無法單獨使用密鑰文件。文件泄露可能來自備份或停用的硬件,黑客通常可以從受攻擊系統中洩露文件。因此,保護私鑰非常重要。
```diff
- name: ssh key passphrase
uses: appleboy/ssh-action@v1.0.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
+ passphrase: ${{ secrets.PASSPHRASE }}
script: |
whoami
ls -al
```
#### 使用主機指紋驗證
設置 SSH 主機指紋驗證可以幫助防止中間人攻擊。在設置之前,運行以下命令以獲取 SSH 主機指紋。請記得將 `ed25519` 替換為您的適當金鑰類型(`rsa`、 `dsa`等),而 `example.com` 則替換為您的主機。
現代 OpenSSH 版本中需要提取的_默認金鑰_類型是 `rsa`(從版本 5.1 開始)、`ecdsa`(從版本 6.0 開始)和 `ed25519`(從版本 6.7 開始)。
```sh
ssh example.com ssh-keygen -l -f /etc/ssh/ssh_host_ed25519_key.pub | cut -d ' ' -f2
```
現在您可以調整您的配置:
```diff
- name: ssh key passphrase
uses: appleboy/ssh-action@v1.0.1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
+ fingerprint: ${{ secrets.FINGERPRINT }}
script: |
whoami
ls -al
```
## 貢獻
我們非常希望您為 `appleboy/ssh-action` 做出貢獻,歡迎提交請求!
## 授權方式
本項目中的腳本和文檔采用 [MIT](LICENSE) 許可證 發布。

View File

@ -3,71 +3,70 @@ description: 'Executing remote ssh commands'
author: 'Bo-Yi Wu' author: 'Bo-Yi Wu'
inputs: inputs:
host: host:
description: 'ssh host' description: 'SSH host address.'
port: port:
description: 'ssh port' description: 'SSH port number.'
default: 22 default: "22"
passphrase: passphrase:
description: 'ssh key passphrase' description: 'Passphrase for the SSH key.'
username: username:
description: 'ssh username' description: 'SSH username.'
password: password:
description: 'ssh password' description: 'SSH password.'
sync: sync:
description: 'synchronous execution if multiple hosts' description: 'Enable synchronous execution if multiple hosts are involved.'
default: false
use_insecure_cipher: use_insecure_cipher:
description: 'include more ciphers with use_insecure_cipher' description: 'Include more ciphers by using insecure ciphers.'
default: false
cipher: cipher:
description: 'the allowed cipher algorithms. If unspecified then a sensible' description: 'Allowed cipher algorithms. If unspecified, a sensible default is used.'
timeout: timeout:
description: 'timeout for ssh to host' description: 'Timeout duration for establishing SSH connection to the host.'
default: "30s" default: "30s"
command_timeout: command_timeout:
description: 'timeout for ssh command' description: 'Timeout duration for SSH commands execution.'
default: "10m" default: "10m"
key: key:
description: 'content of ssh private key. ex raw content of ~/.ssh/id_rsa' description: 'Content of the SSH private key. For example, the raw content of ~/.ssh/id_rsa.'
key_path: key_path:
description: 'path of ssh private key' description: 'Path to the SSH private key file.'
fingerprint: fingerprint:
description: 'sha256 fingerprint of the host public key' description: 'SHA256 fingerprint of the host public key.'
proxy_host: proxy_host:
description: 'ssh proxy host' description: 'SSH proxy host address.'
proxy_port: proxy_port:
description: 'ssh proxy port' description: 'SSH proxy port number.'
default: 22 default: "22"
proxy_username: proxy_username:
description: 'ssh proxy username' description: 'SSH proxy username.'
proxy_password: proxy_password:
description: 'ssh proxy password' description: 'SSH proxy password.'
proxy_passphrase: proxy_passphrase:
description: 'ssh proxy key passphrase' description: 'SSH proxy key passphrase.'
proxy_timeout: proxy_timeout:
description: 'timeout for ssh to proxy host' description: 'Timeout duration for establishing SSH connection to the proxy host.'
default: "30s" default: "30s"
proxy_key: proxy_key:
description: 'content of ssh proxy private key. ex raw content of ~/.ssh/id_rsa' description: 'Content of the SSH proxy private key. For example, the raw content of ~/.ssh/id_rsa.'
proxy_key_path: proxy_key_path:
description: 'path of ssh proxy private key' description: 'Path to the SSH proxy private key file.'
proxy_fingerprint: proxy_fingerprint:
description: 'sha256 fingerprint of the proxy host public key' description: 'SHA256 fingerprint of the proxy host public key.'
proxy_cipher: proxy_cipher:
description: 'the allowed cipher algorithms. If unspecified then a sensible' description: 'Allowed cipher algorithms for the proxy. If unspecified, a sensible default is used.'
proxy_use_insecure_cipher: proxy_use_insecure_cipher:
description: 'include more ciphers with use_insecure_cipher' description: 'Include more ciphers for the proxy by using insecure ciphers.'
default: false
script: script:
description: 'execute commands' description: 'Commands to be executed.'
script_stop: script_stop:
description: 'stop script after first failure' description: 'Stop the script after the first failure.'
default: false
envs: envs:
description: 'pass environment variable to shell script' description: 'Environment variables to be passed to the shell script.'
envs_format:
description: 'Flexible configuration for environment value transfer.'
debug: debug:
description: 'enable debug mode' description: 'Enable debug mode.'
default: false allenvs:
description: 'pass all environment variable to shell script.'
runs: runs:
using: 'docker' using: 'docker'
image: 'Dockerfile' image: 'Dockerfile'

View File

@ -1,27 +0,0 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA4e2D/qPN08pzTac+a8ZmlP1ziJOXk45CynMPtva0rtK/RB26
VbfAF0hIJji7ltvnYnqCU9oFfvEM33cTn7T96+od8ib/Vz25YU8ZbstqtIskPuwC
bv3K0mAHgsviJyRD7yM+QKTbBQEgbGuW6gtbMKhiYfiIB4Dyj7AdS/fk3v26wDgz
7SHI5OBqu9bv1KhxQYdFEnU3PAtAqeccgzNpbH3eYLyGzuUxEIJlhpZ/uU2G9ppj
/cSrONVPiI8Ahi4RrlZjmP5l57/sq1ClGulyLpFcMw68kP5FikyqHpHJHRBNgU57
1y0Ph33SjBbs0haCIAcmreWEhGe+/OXnJe6VUQIDAQABAoIBAH97emORIm9DaVSD
7mD6DqA7c5m5Tmpgd6eszU08YC/Vkz9oVuBPUwDQNIX8tT0m0KVs42VVPIyoj874
bgZMJoucC1G8V5Bur9AMxhkShx9g9A7dNXJTmsKilRpk2TOk7wBdLp9jZoKoZBdJ
jlp6FfaazQjjKD6zsCsMATwAoRCBpBNsmT6QDN0n0bIgY0tE6YGQaDdka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CvIdOr1jxJpw0CrKHqMG/kzeljtM1HOojD5gHwESwwsZL5P5/IWvnZlGZD0fAp/SPWpZIeMTeH12QANxX69RoQfKLRMYWSabDUvGKkIxQCBaoVOmyVQIqyT5wTZ3msfGVLb729TlZcNo+8snG0k2W9skdlahx1TugzE096P+RzjUfov6g1NZKHCN8VSeu4+gmPIEiuN3tt99dKDNBMx/QYLfPpw== deploy@easyssh

View File

@ -1,13 +0,0 @@
#!/bin/sh
if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then
# generate fresh rsa key
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
fi
if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then
# generate fresh dsa key
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
fi
exec "$@"