{"id":154,"date":"2020-10-16T15:59:24","date_gmt":"2020-10-16T15:59:24","guid":{"rendered":"http:\/\/www.matez.de\/?p=154"},"modified":"2020-10-16T16:00:06","modified_gmt":"2020-10-16T16:00:06","slug":"support-for-openssh-default-key-format-in-jsch-fork","status":"publish","type":"post","link":"https:\/\/www.matez.de\/index.php\/2020\/10\/16\/support-for-openssh-default-key-format-in-jsch-fork\/","title":{"rendered":"support for openssh default key format in jsch fork"},"content":{"rendered":"\n<p>As of <a href=\"https:\/\/www.openssh.com\/txt\/release-7.8\">release 7.8 of openssh<\/a> the default format of generated keys is the OPENSSH PRIVATE KEY format.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> * ssh-keygen(1): write OpenSSH format private keys by default\n   instead of using OpenSSL's PEM format. The OpenSSH format,\n   supported in OpenSSH releases since 2014 and described in the\n   PROTOCOL.key file in the source distribution, offers substantially\n   better protection against offline password guessing and supports\n   key comments in private keys. If necessary, it is possible to write\n   old PEM-style keys by adding \"-m PEM\" to ssh-keygen's arguments\n   when generating or updating a key.<\/pre>\n\n\n\n<p>This means, that the private key looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-----BEGIN OPENSSH PRIVATE KEY-----\nb3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABCnz7UO3z\nwPva3ZeqAv3Fb3AAAAEAAAAAEAAABoAAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlz\ndHAyNTYAAABBBKHuAe5N1uLPUpY3t5kyYuISOxUobPZfK8H+CQaJTCALTMFrT63UDDYLyI\n2xroS67T2bWHkuhX1BHiTGP6JpwL8AAACwwZ1jHlWJTZUwle+U8cXZx2Od0s4Y71qL9onX\n\/+g+UVxaBeAZq88S8fbIPc1netiue9VVo7Qiw4e4WEPUCWKykQ+mwBX9798q\/QUbrK3UZl\n509ZLFe\/DN41mVGO6rU6NHy+1mVstStgEEle7Dc+JaZwa\/iZRVeRNq58MXQ5HBAO8fi4Y5\nyhe050OWLkNylLtLOmRffRWo6eFg\/DwCK64G5+qsSeTYVrt0nq\/ffcvyovc=\n-----END OPENSSH PRIVATE KEY-----<\/pre>\n\n\n\n<p>If you are a user of the java library jsch, which is a java implementation of the ssh protocol, you were not able to use this keys, because it does not support it. you either had to create your keys with a flag or convert them to old pem format.<\/p>\n\n\n\n<p>Now I have implemented support for the &#8220;proprietary&#8221; key format in the fork of jsch, which you can find at <a href=\"https:\/\/github.com\/mwiede\/jsch\">https:\/\/github.com\/mwiede\/jsch<\/a><\/p>\n\n\n\n<p>Please upgrade to version 0.1.60 and give it a try.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As of release 7.8 of openssh the default format of generated keys is the OPENSSH PRIVATE KEY format. * ssh-keygen(1): write OpenSSH format private keys by default instead of using OpenSSL&#8217;s PEM format. The OpenSSH format, supported in OpenSSH releases since 2014 and described in the PROTOCOL.key file in the source distribution, offers substantially better &hellip; <a href=\"https:\/\/www.matez.de\/index.php\/2020\/10\/16\/support-for-openssh-default-key-format-in-jsch-fork\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;support for openssh default key format in jsch fork&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[45,50],"_links":{"self":[{"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/posts\/154"}],"collection":[{"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/comments?post=154"}],"version-history":[{"count":2,"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":157,"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/posts\/154\/revisions\/157"}],"wp:attachment":[{"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.matez.de\/index.php\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}