{"id":313,"date":"2015-07-30T03:00:36","date_gmt":"2015-07-29T18:00:36","guid":{"rendered":"http:\/\/stuffy.dip.jp\/wordpress\/?p=313"},"modified":"2017-05-29T16:17:19","modified_gmt":"2017-05-29T07:17:19","slug":"ssh-key-authentication","status":"publish","type":"post","link":"https:\/\/www.stuffy.site\/wordpress\/?p=313","title":{"rendered":"TeraTerm SSH\u9375\u8a8d\u8a3c"},"content":{"rendered":"<p>Linux \u306e\u30b3\u30de\u30f3\u30c9\u64cd\u4f5c\u306b\u6b20\u304b\u305b\u306a\u3044TeraTerm \u3067\u3059\u304c\u3001root \u6a29\u9650\u3092\u591a\u7528\u3057\u3066\u3044\u305f\u306e\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u6f0f\u308c\u305f\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u4eca\u56de\u306f\u3001\u9375\u8a8d\u8a3c\u306b\u3088\u308b\u30ed\u30b0\u30a4\u30f3\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001TeraTerm \u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3066 [\u8a2d\u5b9a]\u00a0\u2192 [SSH \u9375\u751f\u6210\u2026]\u00a0\u2192 (\u9375\u306e\u7a2e\u985e)[RSA]\u306b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3001[\u751f\u6210] \u30dc\u30bf\u30f3\u3092\u62bc\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.stuffy.site\/wordpress\/wp-content\/uploads\/2015\/07\/ssh_key.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-314\" src=\"https:\/\/www.stuffy.site\/wordpress\/wp-content\/uploads\/2015\/07\/ssh_key-300x215.png\" alt=\"ssh_key\" width=\"300\" height=\"215\" \/><\/a><\/p>\n<p>[\u9375\u306e\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba] \u3092\u5165\u529b\u3057\u3066\u3001[\u516c\u958b\u9375\u306e\u4fdd\u5b58] [\u79d8\u5bc6\u9375\u306e\u4fdd\u5b58] \u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u30d5\u30a9\u30eb\u30c0\u306b [id_rsa.pub] [id_rsa] \u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n<p>TeraTerm \u3067\u3001\/home\/\u30e6\u30fc\u30b6\u30fc\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u79fb\u52d5\u3057\u3066\u516c\u958b\u9375 [id_rsa.pub] \u3092\u753b\u9762\u306b\u30c9\u30e9\u30c3\u30b0\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/www.stuffy.site\/wordpress\/wp-content\/uploads\/2015\/07\/save_key.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-324\" src=\"https:\/\/www.stuffy.site\/wordpress\/wp-content\/uploads\/2015\/07\/save_key-300x151.png\" alt=\"save_key\" width=\"300\" height=\"151\" \/><\/a><\/p>\n<p>[\u30d5\u30a1\u30a4\u30eb\u8ee2\u9001\u3057\u307e\u3059\u304b] \u306e\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u306b\u3001[ .ssh] \u3068\u5165\u529b\u3057\u3066 [SCP]\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002\u516c\u958b\u9375\u3092\u3001.ssh\/authorized_keys \u30d5\u30a1\u30a4\u30eb\u306b\u30ea\u30cd\u30fc\u30e0\u3059\u308b\u305f\u3081\u30b3\u30de\u30f3\u30c9\u3067<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">$ cd .ssh\r\n$ mv id_rsa.pub authorized_keys\r\n$ chmod 600 authorized_keys\r\n$ chmod 700 . \u2190[\u30d4\u30ea\u30aa\u30c9\u3092\u5fd8\u308c\u305a\u306b]<\/pre>\n<p>\u9375\u304c\u8907\u6570\u3042\u308b\u3068\u304d\u306b\u306f\u3001mv \u3067\u306f\u306a\u304f<\/p>\n<pre class=\"brush: actionscript3; gutter: false; first-line: 1\"># cat id_rsa.pub &gt;&gt; authorized_keys<\/pre>\n<p>\u3068\u5165\u529b\u3057\u307e\u3059\u3002TeraTerm \u3092\u518d\u8d77\u52d5\u3057\u3066\u3001\u5148\u7a0b\u5165\u529b\u3057\u305f\u9375\u306e\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u5165\u529b\u3057\u3066\u3001[RSA\u9375\u3092\u4f7f\u3046]\u30c1\u30a7\u30c3\u30af\u3092\u5165\u308c \u30d5\u30a9\u30eb\u30c0\u306b\u4fdd\u5b58\u3057\u305f[\u79d8\u5bc6\u9375] id_rsa \u3092\u6307\u5b9a\u3057\u3066 [OK] \u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066<\/p>\n<p><a href=\"https:\/\/www.stuffy.site\/wordpress\/wp-content\/uploads\/2015\/07\/ssh_login.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-316\" src=\"https:\/\/www.stuffy.site\/wordpress\/wp-content\/uploads\/2015\/07\/ssh_login-300x290.png\" alt=\"ssh_login\" width=\"300\" height=\"290\" \/><\/a><\/p>\n<p>\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u5f8c\u306f\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u3092\u7121\u52b9\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: actionscript3; gutter: false; first-line: 1\"># vi \/etc\/ssh\/sshd_config\r\n# PasswordAuthentication yes \u2193 \u8a2d\u5b9a\u5024\u3092\u3001no \u306b\u5909\u66f4\r\nPasswordAuthentication no<\/pre>\n<p>(\u4e00\u90e8\u3001\u52a0\u7b46\u3057\u307e\u3057\u305f\u3002\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux \u306e\u30b3\u30de\u30f3\u30c9\u64cd\u4f5c\u306b\u6b20\u304b\u305b\u306a\u3044TeraTerm \u3067\u3059\u304c\u3001root \u6a29\u9650\u3092\u591a\u7528\u3057\u3066\u3044\u305f\u306e\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u6f0f\u308c\u305f\u306e\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u4eca\u56de\u306f\u3001\u9375\u8a8d\u8a3c\u306b\u3088\u308b\u30ed\u30b0\u30a4\u30f3\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u307e\u305a\u3001TeraTerm \u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3067 &hellip; <a href=\"https:\/\/www.stuffy.site\/wordpress\/?p=313\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">TeraTerm SSH\u9375\u8a8d\u8a3c<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6,5,17,4],"tags":[],"class_list":["post-313","post","type-post","status-publish","format-standard","hentry","category-linux","category-settings","category-software","category-ssh","category-windows"],"_links":{"self":[{"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=313"}],"version-history":[{"count":1,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":842,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/313\/revisions\/842"}],"wp:attachment":[{"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stuffy.site\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}