-
-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenSSH claims private keys are illegal because LF after the last line of them are removed #147
Comments
(日本語で書きます!) 動かしているOS( |
OS: ちなみに実機のUbuntu 18.04でも再現しました。 エラーメッセージは
です。 LFを消すには次のコマンドを実行しました。
Ubuntu 18.04で
|
@tats-u
SSHキーのフォーマットが原因かもしれません。 |
@shimataro
|
@tats-u もともとOpenSSH形式の鍵を使えないのはVMのOpenSSHのバージョンの問題なので、VM側の更新を待つか、(RSAなどを使った)PEM形式の鍵を使うかのどちらかをおすすめします・・・! |
@shimataro |
I use the following as a workaround: -
name: Install SSH Key
uses: shimataro/[email protected]
with:
key: ${{ secrets.DEPLOYMENT_SSH_KEY }}
name: id_ed25519
known_hosts: ${{ env.known_hosts }}
-
name: Fix no newline at end of SSH key # Workaround until https://github.com/shimataro/ssh-key-action/pull/156
run: |
echo "" | sudo tee -a ~/.ssh/id_ed25519 |
@MatthiasKunnen
|
I couldn't install an OpenSSH private key only with the 1st step.
I managed to do it by adding the 2nd step.
It makes up for the lost LF in the last line. (
-----
->-----\n
)tail -c 1 $key
outputs-
if the last LF is missing, or\n
(equals to the output ofecho
) if alive.The text was updated successfully, but these errors were encountered: