0
0

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 5 years have passed since last update.

インスタンスにteratermではログインできるのに、sshコマンドではできない

Posted at

前提

windowsのputty genによって生成された秘密鍵をssh(mac)で使用しています。

解決策

puttygenコマンドでopenssh形式に変換する


$ brew install putty
$ puttygen id_rsa.ppk -O private-openssh -o id_rsa

原因:鍵ファイルのフォーマットが間違っている

puttyによって作成されるppkファイルのフォーマット


PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: rsa-key-20200128
Public-Lines: 6
xxxxxxx...
Private-Lines: 14
xxxxxxx....
Private-MAC: macアドレス

読み取り可能なフォーマット


-----BEGIN OPENSSH PRIVATE KEY-----
xxxxxxxxxxxxxx...

-----END OPENSSH PRIVATE KEY-----

0
0
0

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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?