OpenSSH_8.9p1 Ubuntu-3ubuntu0.7
在 WSL 上使用,ssh-keygen
拒绝之前生成的密钥,输出错误:
do_convert_from_ssh2:解析密钥:格式无效
再生产
$ cd /tmp/some_directory
$ ssh-keygen -f id_rsa -m RFC4716 -N ''
[... nominal output ...]
$ ssh-keygen -i -f id_rsa -m RFC4716
do_convert_from_ssh2: parse key: invalid format
$ ssh-keygen -i -f id_rsa
do_convert_from_ssh2: parse key: invalid format
由于这是一个测试/废弃的私钥,我可以与您分享:
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEA9M/XxwykVVEXmXFTJl7Dbn5lhfnYhY94nDquc8dfuE00AnRMuL6d
OG+bPWf916ku/++eWz/Epb/W7DsbAd0YNx4C2L0Rd/EqGzQr6TCM4fgLkXd2h98wOQ24yJ
D/Wy7fYlp/hAPomrx50cR29TmAG4yopCPOMc1aPUjylMJHPflbm0icEeh7R/rFKA2OSUj9
LD0GCgQb1TLSyQ6BgrustkDMbzF52j4k3g/PSvzmMpoFg4HI61OecS4wxwwANi+kiXC/FS
AUEWhxuHt45B5SwkSGhskD0yCE/RLQhcrqZb4H3dwabDCkbc1bXGIyoE1okDy9PJakG65Z
xSR1QzZqNarr1+lvMPcftwxzOePeTyqMgmoYujXCGv7ehdsyFkDSth0zrcylW9EVuADnSS
DFVcgbdxPj8mVJ0txO7Pn4ksfo/muR8RCI8yHvlM/doZcgq38IhWzh0WpJAJbQPI/RK8ia
w8h+6jGr/EGoNjtApAXXgpwMLiEagj5ut0lWpYiTAAAFiGhq6YVoaumFAAAAB3NzaC1yc2
EAAAGBAPTP18cMpFVRF5lxUyZew25+ZYX52IWPeJw6rnPHX7hNNAJ0TLi+nThvmz1n/dep
Lv/vnls/xKW/1uw7GwHdGDceAti9EXfxKhs0K+kwjOH4C5F3doffMDkNuMiQ/1su32Jaf4
QD6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WzV+NhblfWULiV8iuOMfeLm15SZ/40P5c9XgAnBhyMgE22LynZEUrfvq
90VyubjPX5/8R8goUSn1wuRC4o333QbYguVmKqRh02ZFMI9igAAADBAPjAvzz9RLTWuQMh
Tib0uuH+AsRb8ExOg0xXiFazjmt/9iDi3GnFUbuxzeCntCKIXvGlcwH+KvroekeIHcqnac
054o/6dH21gJX6FxkleBjPOXXYipHSSpqg7GX97gtQDajzyzKR7KFru+3Nxdvc13Xkd+Op
R6WJoeNAnoaVJMtLGPrtJWc/ywrgLbKGA73hKoecQmwlKaspvBVZNyehzg+2o6Pxl1hChb
y+rpgsGpgHKbTLSIQEmA52dUZgGjjS0wAAAMEA+/Gz6hKHXxfJQRERaAlLkKaC3HiXXdp2
Zx10aKDuQuI+TVYBdL7qHDScDY4kHkONEOoO3QN6d7v5umBGpBHyCckxvBhKWpTZTDzCUY
HXLjoWU/EG68Nj+vh3R0Xx8QY7/ccqDYnW/P/ZFz/ByLLbDOBR2Nu25dC/FdAiiEeR9+U2
18gTSBKCX6jYx/SAkbAMzBE8LM7eTw8bXIxP3MXvysuZQMWKxT8ArL4lxX+WS3izcEBAbr
hb486LxiNlPVtBAAAAEnlzY0BMVDBQQVIwMTA5MjkzMA==
-----END OPENSSH PRIVATE KEY-----
(注意:行正确地由单个 0x0a 分隔,并且文件正确地显示了最终的 0x0a)
我的最终目标是将这个密钥转换为与openssl pkeyutl -decrypt -inkey ${converted_key_file}
.我究竟做错了什么?