RSA処理はコンテナとUbuntuの間で異なります。

RSA処理はコンテナとUbuntuの間で異なります。

私は2つのUbuntu環境(コンテナとマシン)を持っており、同じrsa秘密鍵を非常に異なる方法で処理します。ログで私が見た最初の顕著な変更は、type何か他のものを識別したことです。

Ubuntuコンテナ(Xenial):

OpenSSH_7.2p2 Ubuntu-4ubuntu2.8, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "github.com" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to github.com [140.82.113.4] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: SELinux support disabled
debug1: identity file /push-ssh/id_rsa type 1

Ubuntuマシン(Bionic):

OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "github.com" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to github.com [140.82.118.3] port 22.
debug1: Connection established.
debug1: identity file /tmp/id_rsa type 0

ファイルの内容がsha256と同じであることを確認してください。

2eb49319702ccee5acd89b6632a5dc00bb450fad6fa5de7d0f99af6c45a28412  /push-ssh/id_rsa
2eb49319702ccee5acd89b6632a5dc00bb450fad6fa5de7d0f99af6c45a28412  /tmp/id_rsa

この種の不一致がどのように発生するかを説明できる人はいますか?

ベストアンサー1

OpenSSH_7.2p2 Ubuntu-4ubuntu2.8, OpenSSL 1.0.2g 2016年3月1日

OpenSSH_7.6p1 Ubuntu-4ubuntu0.3、OpenSSL 1.0.2n 2017年12月7日

これは本当に単純な推測ですが、定義されたファイル形式の内部識別子は明らかです。sshkey.c2 つのバージョン間で変更が発生しました。

これについてもっと学ぶことができます。askubuntu.comで次の質問をしてください。

おすすめ記事