1
0
Fork 0
mirror of https://github.com/shimataro/ssh-key-action.git synced 2025-06-19 22:52:10 +10:00

Add short note on how to convert OPENSSH to PEM format (#134)

* Fix #130 - improve readme.md (#131)

Co-authored-by: shimataro <shimataro@zelkova.cc>

* update CHANGELOG

* fixed lint error

* add link to contributor

Co-authored-by: Helmut Wolf <shadow1runner@users.noreply.github.com>
This commit is contained in:
shimataro 2020-06-06 09:33:26 +09:00 committed by GitHub
parent e45e94049a
commit db8ead54b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -19,7 +19,9 @@ Useful for SCP, SFTP, and `rsync` over SSH in deployment script.
Add your SSH key to your product secrets by clicking `Settings` - `Secrets` - `Add a new secret` beforehand.
**NOTE:** OPENSSH format (key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`) may not work due to OpenSSH version on VM. Please use PEM format (begins with `-----BEGIN RSA PRIVATE KEY-----`) instead.
**NOTE:** OPENSSH format (key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`) may not work due to OpenSSH version on VM.
Please use PEM format (begins with `-----BEGIN RSA PRIVATE KEY-----`) instead.
In order to convert your key inline to PEM format simply use `ssh-keygen -p -m PEM -f ~/.ssh/id_rsa`.
```yaml
runs-on: ubuntu-latest
@ -78,11 +80,11 @@ steps:
### SSH failed even though key has been installed.
Check belows:
Check below:
* `Load key "/HOME/.ssh/id_rsa": invalid format`:
* OPENSSH format (key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`) may not work.
* Use PEM format (begins with `-----BEGIN RSA PRIVATE KEY-----`).
* Use PEM format (begins with `-----BEGIN RSA PRIVATE KEY-----`). Convert it from OPENSSH format using `ssh-keygen -p -m PEM -f ~/.ssh/id_rsa`
* `Host key verification failed.`:
* Set `known_hosts` option correctly (use `ssh-keyscan` command).