0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

openssh `load pubkey "mykeyfilepath": invalid format`

Posted at

背景

Cygwin の ssh である時から以下の出力が出るようになって気になっていた。
今年(2020年初めくらいから)。

$ ssh host
load pubkey "/home/{user}/.ssh/{filename}.pem": invalid format

この出力が出るホストと出ないホストがあって、その差が分からなかった。

~/.ssh/configIdentityFile で指定したホスト名で ssh していた。

Cygwin や OpenSSH のバージョンは以下

$ uname -a
CYGWIN_NT-10.0 PC-MORINO 3.1.6(0.340/5/3) 2020-07-09 08:20 x86_64 Cygwin

$ ssh -V
OpenSSH_8.3p1, OpenSSL 1.1.1f  31 Mar 2020

解決方法

以下の出力がでているとして...

load pubkey "/home/{user}/.ssh/{filename}.pem": invalid format

公開鍵をメッセージのファイル名の末尾に .pub を付加したファイル名で置くだけ。
/home/{user}/.ssh/{filename}.pem.pub

参考情報

0
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?