{"id":2029,"date":"2018-08-01T09:54:38","date_gmt":"2018-08-01T00:54:38","guid":{"rendered":"http:\/\/research.itplants.com\/?p=2029"},"modified":"2018-08-01T09:55:39","modified_gmt":"2018-08-01T00:55:39","slug":"%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e3%81%aa%e3%81%97%e3%81%a7ssh","status":"publish","type":"post","link":"https:\/\/research.itplants.com\/?p=2029","title":{"rendered":"\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3057\u3067ssh"},"content":{"rendered":"<p>Mac\u304b\u3089Raspberry Pi\u3078\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3057\u3067ssh\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<p>Mac\u3067\u3001<\/p>\n<p>(1) ssh-key\u3092\u4f5c\u308b\u3002<br \/>\n<code>$ ssh-keygen -t rsa<\/code><br \/>\n\u3059\u308b\u3068\u3001<br \/>\n<code>Enter file in which to save the key (\/home\/&lt;user&gt;\/.ssh\/id_rsa):<\/code><\/p>\n<p>\u3068\u306a\u308b\u306e\u3067\u3001\uff13\u56de\u30ea\u30bf\u30fc\u30f3\u3092\u62bc\u3059\u3002<\/p>\n<p>(2) ssh\u3057\u305f\u3044\u30b5\u30fc\u30d0\u30fc\u5074(Raspberry pi)\u306b\u516c\u958b\u9375\uff08public key\uff09\u3092\u899a\u3048\u3055\u305b\u308b\u3002<br \/>\n<code>$ ssh-copy-id -i ~\/.ssh\/id_rsa.pub pi@&lt;raspberry pi ip address&gt;:<\/code><\/p>\n<p>\/home\/pi\/.ssh\/authorized_keys\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u306bpublic key\u304c\u4fdd\u5b58\u3055\u308c\u308b\u3002<\/p>\n<p>\u4ee5\u5f8c\u3001Mac\u5074\u3067\u3001<\/p>\n<p>$ ssh pi@&lt;<code>raspberry pi ip address&gt;<\/code><\/p>\n<p>\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u3002<\/p>\n<p>$ ssh pi@&lt;<code>raspberry pi ip address&gt; command<\/code><\/p>\n<p>\u3067\u6307\u5b9a\u3057\u305f\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>$ ssh pi@&lt;<code>raspberry pi ip address&gt; hostname<\/code><\/p>\n<p>\u3068\u3059\u308b\u3068\u30db\u30b9\u30c8\u540d\u304c\u8fd4\u3063\u3066\u304f\u308b\u3002rsh\u3092\u4f7f\u3046\u3088\u308a\u3082\u7c21\u5358\u3067\u5b89\u5168\u3002<\/p>\n<p><a href=\"https:\/\/qiita.com\/hnishi\/items\/5dec4c7fca9b5121430f\">\u53c2\u8003\u306b\u3057\u305f\u30b5\u30a4\u30c8<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mac\u304b\u3089Raspberry Pi\u3078\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3057\u3067ssh\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002 Mac\u3067\u3001 (1) ssh-key\u3092\u4f5c\u308b\u3002 $ ssh-keygen -t rsa \u3059\u308b\u3068\u3001 Enter file in which to sav&#8230;<\/p>\n<p><a class=\"more\" href=\"https:\/\/research.itplants.com\/?p=2029\"> Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/posts\/2029"}],"collection":[{"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/research.itplants.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2029"}],"version-history":[{"count":3,"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/posts\/2029\/revisions"}],"predecessor-version":[{"id":2032,"href":"https:\/\/research.itplants.com\/index.php?rest_route=\/wp\/v2\/posts\/2029\/revisions\/2032"}],"wp:attachment":[{"href":"https:\/\/research.itplants.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/research.itplants.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2029"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/research.itplants.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}