{"comment":{"url":"https://api.github.com/repos/kgbu/erlandom/comments/11876763","html_url":"https://github.com/kgbu/erlandom/commit/35154de2c6764c4c801dfd8830acb7ba3a609ff5#commitcomment-11876763","id":11876763,"user":{"login":"kgbu","id":50808,"avatar_url":"https://avatars.githubusercontent.com/u/50808?v=3","gravatar_id":"","url":"https://api.github.com/users/kgbu","html_url":"https://github.com/kgbu","followers_url":"https://api.github.com/users/kgbu/followers","following_url":"https://api.github.com/users/kgbu/following{/other_user}","gists_url":"https://api.github.com/users/kgbu/gists{/gist_id}","starred_url":"https://api.github.com/users/kgbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kgbu/subscriptions","organizations_url":"https://api.github.com/users/kgbu/orgs","repos_url":"https://api.github.com/users/kgbu/repos","events_url":"https://api.github.com/users/kgbu/events{/privacy}","received_events_url":"https://api.github.com/users/kgbu/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":"","commit_id":"35154de2c6764c4c801dfd8830acb7ba3a609ff5","created_at":"2015-06-26T07:31:45Z","updated_at":"2015-06-26T07:31:45Z","body":"$ ssh-keygen -l -f foo.key.pub\r\n256 8a:1b:b5:aa:b8:c3:b4:24:ca:86:48:7c:e3:61:4f:12 foo.key.pub (ECDSA)\r\n\r\n$ ssh-keygen -l -f rsa.key.pub\r\n2048 fc:93:bd:a5:7d:72:35:7a:27:f9:db:48:a4:4c:14:b3 rsa.key.pub (RSA)\r\n\r\n\r\n5> {ok,B} = file:read_file(\"foo.key.pub\").\r\n{ok,<<\"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHs4CDouGpy5sEMTFMtetV+kCB7Q7unu3i0M\"...>>}\r\n7> public_key:ssh_decode(B, openssh_public_key).\r\n** exception error: no case clause matching [<<\"ecdsa-sha2-nistp256\">>,\r\n                                             <<\"AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHs4CDouGpy5sEMTFMtetV+kCB7Q7unu3i0MnTTRAKHWRMto2+pqqfur\"...>>,\r\n                                             <<\"get3@www8251uo.sakura.ne.jp\">>]\r\n     in function  pubkey_ssh:do_openssh_decode/3 (pubkey_ssh.erl, line 187)\r\n\r\n8> {ok,DSA} = file:read_file(\"dsa.key.pub\").    \r\n{ok,<<\"ssh-dss AAAAB3NzaC1kc3MAAACBAObQS8vgkcIdd5hJRHzCdsq3quCGYCv8hYJBDaAHDbZq5gWbbRHTetlWWhTC3c6W8eNmKO0D2yOYYC20\"...>>}\r\n9> public_key:ssh_decode(DSA, openssh_public_key).\r\n[{{80865526535851260518629791507782120490771422868301976000899831625369072623790350637121635538424651315863957709257777169185113566088445785490678274052441116324415371932312596175219098809562736689905036782782834794152229132232718629260846405875680026709893319466557517004199238909008957361814528359562155774751,\r\n   {'Dss-Parms',162082861653341457321949382853580910139021473815822445854232655291167389922443680975204677227196910753702475743925321523632955339231207812264445929945253671965701162038915773442159873594204263259774098812714625735403286874743997760059224967629912340393758809098984073702111705919860423613761513974710219846599,\r\n                1332937344109690373161868150725563771434719115917,\r\n                105808086885867840829322562738809253362244502054633018036197205394282218780077412428709991257475679601030161815104087212171533880225239640434999007474704146470431616894116020701990731855710246180722701950268627785540482834134459728857982192880290536573783339986898956684666852092068131000592518128677576685668}},\r\n  [{comment,\"get3@www8251uo.sakura.ne.jp\"}]}]\r\n\r\n$ uname -a\r\nLinux www8251uo.sakura.ne.jp 2.6.32-504.16.2.el6.x86_64 #1 SMP Wed Apr 22 06:48:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\n$ erl\r\nErlang/OTP 18 [erts-7.0] [source-4d83b58] [64-bit] [smp:2:2] [async-threads:10] [hipe] [kernel-poll:false]\r\n\r\nEshell V7.0  (abort with ^G)\r\n\r\n\r\nあ、ここのあたりか\r\nhttps://github.com/erlang/otp/blob/OTP-18.0/lib/public_key/src/pubkey_ssh.erl#L186-L199\r\n\r\nたしかにECDSAなんてカケラもないね。。。。"}}