チケット #34830

Bug in ED25519 ssh connection

登録: 2015-01-23 05:22 最終更新: 2015-01-30 17:15

報告者:
(匿名)
担当者:
(未割り当て)
チケットの種類:
状況:
完了
コンポーネント:
マイルストーン:
優先度:
6
重要度:
5 - 中
解決法:
修正済み
ファイル:
なし
投票
点数: 0
No votes
0.0% (0/0)
0.0% (0/0)

詳細

Hi,

I use Teraterm in the latest version 4.85 and tried the new ECC key ED25519. I followed http://ttssh2.sourceforge.jp/manual/en/usage/ssh.html to generate a ED25519 key and copied it to the authorized_keys on the target.

I tried to connect and got at once this error message read error SSH2 private key file error:0906D606C:PEM routines:PEM_read_bio:no start line

BUT I got this only if I am using a ED25519 key!! I tried all other keys RSA, DSA, ECDSA and they work!

I take the with Teraterm generated key and used it in a Cygwin installation and could immediatley connect to the target.

So the bug is not in the keygen, it is in handling the key.

Kind regards, S.

チケットの履歴 (14 件中 3 件表示)

2015-01-23 05:22 更新者: None
  • 新しいチケット "Bug in ED25519 ssh connection" が作成されました
2015-01-24 00:05 更新者: (del#1144)
コメント

I guess this message says that the key file isn't start with "-----BEGIN OPENSSH PRIVATE KEY-----" line.

Please check the key file which you specified.

2015-01-24 01:31 更新者: None
コメント

Hi Maya,

I checked the key and tried the key on a differenet pc with native OpenSSH and the key is working and starts with


....


I am sure that is a Teraterm problem because I could verify that other Public Keys are working and the Key is working.

Kind Regards S.

2015-01-24 10:59 更新者: (del#1144)
コメント

I added some messages to debug. Please let us know the message.

http://ttssh2.sourceforge.jp/snapshot/snapshot-20150124.zip

2015-01-25 22:30 更新者: None
コメント

Hi Maya,

Here ist the error message. If you need more please let me know

read error SSH2 private key file

error:0906D06C:PEM routines:PEM_read_bio:no start line

keyfile=id_ed25519, keyfile_type=1, key_pair==NULL

Kind regards S.

2015-01-26 01:26 更新者: (del#1144)
コメント

It seems error message is broken.

If your key has no passphrase, please add a passphrase. The KDF key which has no passphrase is not able to use for authentication. (ED25519 key is force KDF)

2015-01-26 01:26 更新者: (del#1144)
  • コンポーネントTera Term から TTSSH に更新されました
  • マイルストーン(未割り当て) から Tera Term 4.86 (完了済み) に更新されました
2015-01-27 06:21 更新者: None
コメント

I add a passphrase to the key and now it works. Strange that the key without a passphrase works with Cygwin. Please add for the 4.86 a possibility for a ED25519 key authentication without a passphrase. Thank you for the help!

2015-01-27 14:38 更新者: (del#1144)
コメント

Hi,

I tried ED25519 key without passphrase on Cygwin. But it was rejected by ssh command.

Windows 7 64bit
Cygwin 1.7.33-2 32bit
OpenSSH 6.7p1

debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering ED25519 public key: /cygdrive/c/sshkey/id_ed25519
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-ed25519 blen 51
debug2: input_userauth_pk_ok: fp xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
debug1: key_load_private_type: incorrect passphrase supplied to decrypt private key
Enter passphrase for key '/cygdrive/c/sshkey/id_ed25519':
debug2: no passphrase given, try next key
debug2: we did not send a packet, disable method
debug1: Next authentication method: keyboard-interactive

How did you login with the non-passphrase key?

2015-01-28 22:55 更新者: None
コメント

Hi,

I use Windows 7 64bit, Cygwin 1.7, OpenSSH_6.6.1, Server is OpenSSH_6.7 I created a ED25519 key with ssh-keygen and NO password then ssh -l ss IP success! Tried it with 3 different OpenSSH server (Ubuntu OpenSSH 6.6, Native OpenSSH 6.7 on a OpenBSD and OpenSSH 6.7 on Debian) Never needs any password for this key. Here the debug information

debug1: Connection established. debug1: identity file /home/ss/.ssh/id_ed25519 type 4 debug1: identity file /home/ss/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.6.1 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7 debug1: match: OpenSSH_6.7 pat OpenSSH* compat 0x04000000 .... debug1: Offering ED25519 public key: /home/ss/.ssh/id_ed25519 debug2: we sent a publickey packet, wait for reply debug1: Server accepts key: pkalg ssh-ed25519 blen 51 debug2: input_userauth_pk_ok: fp ab:28:..... debug1: Authentication succeeded (publickey). Authenticated to IP (IP:22).

2015-01-28 22:56 更新者: None
コメント

Here debug with better format

debug1: Connection established.

debug1: identity file /home/ss/.ssh/id_ed25519 type 4

debug1: identity file /home/ss/.ssh/id_ed25519-cert type -1

debug1: Enabling compatibility mode for protocol 2.0

debug1: Local version string SSH-2.0-OpenSSH_6.6.1

debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7

debug1: match: OpenSSH_6.7 pat OpenSSH* compat 0x04000000 .... debug1: Offering ED25519 public key: /home/ss/.ssh/id_ed25519

debug2: we sent a publickey packet, wait for reply

debug1: Server accepts key: pkalg ssh-ed25519 blen 51

debug2: input_userauth_pk_ok: fp ab:28:.....

debug1: Authentication succeeded (publickey).

Authenticated to IP (IP:22).

2015-01-29 17:48 更新者: (del#1144)
  • 解決法なし から 修正済み に更新されました
コメント

I fixed this issue.

1. use of KDF format private key without passphrase for auth.

2. save of KDF format private key without passphrase.

http://ttssh2.sourceforge.jp/snapshot/snapshot-20150129.zip

Note: the key that was generated and saved without passphrase by past TeraTerm(TTSSH) is not valid.

2015-01-29 23:28 更新者: None
コメント

Thank you for fixing!

2015-01-30 17:15 更新者: (del#1144)
  • 状況オープン から 完了 に更新されました
  • チケット完了時刻2015-01-30 17:15 に更新されました

添付ファイルリスト

添付ファイルはありません

編集

ログインしていません。ログインしていない状態では、コメントに記載者の記録が残りません。 » ログインする