{"id":1494,"date":"2019-12-29T23:39:03","date_gmt":"2019-12-29T14:39:03","guid":{"rendered":"https:\/\/blog.id774.net\/entry\/?p=1494"},"modified":"2019-12-29T23:44:45","modified_gmt":"2019-12-29T14:44:45","slug":"macos-%e3%81%a7-sshd-%e3%81%ae%e8%a8%ad%e5%ae%9a%e3%81%8c%e6%97%a2%e5%ae%9a%e5%80%a4%e3%81%ab%e6%88%bb%e3%81%a3%e3%81%a6%e3%81%97%e3%81%be%e3%81%86%e5%95%8f%e9%a1%8c","status":"publish","type":"post","link":"https:\/\/harpuia.id774.net\/entry\/2019\/12\/29\/1494\/","title":{"rendered":"macOS \u3067 sshd \u306e\u8a2d\u5b9a\u304c\u65e2\u5b9a\u5024\u306b\u623b\u3063\u3066\u3057\u307e\u3046\u554f\u984c"},"content":{"rendered":"<p>macOS \u3067\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30fb\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u3059\u308b\u3068 sshd \u306e\u8a2d\u5b9a\u304c\u65e2\u5b9a\u5024\u306b\u623b\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308b\u3088\u3046\u3060\u3002<br \/>\n\u3053\u308c\u306f\u5927\u304d\u306a\u554f\u984c\u3067\u3001\u5916\u90e8\u304b\u3089 ssh \u3092\u63a5\u7d9a\u3059\u308b\u306b\u3042\u305f\u308a\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u3092\u7121\u52b9\u5316\u3057\u3066\u3044\u3066\u3082\u3001\u305d\u308c\u304c\u4e0a\u8a18\u306e\u539f\u56e0\u306e\u305f\u3081\u6709\u52b9\u306a\u72b6\u614b\u306b\u623b\u3063\u3066\u3057\u307e\u3046\u3002<\/p>\n<p>\u3053\u306e\u554f\u984c\u3092\u56de\u907f\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u5b9a\u671f\u7684\u306b \/etc\/ssh\/sshd_config \u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u4ee5\u4e0b\u306e\u8a2d\u5b9a\u3068\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:1000px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">PasswordAuthentication no<br \/>\nPermitEmptyPasswords no<br \/>\nChallengeResponseAuthentication no<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Mac \u3067\u306f sshd \u306b\u95a2\u3059\u308b\u4e00\u90e8\u306e\u8a2d\u5b9a\u306e\u307f\u3001\u3053\u306e\u3088\u3046\u306b sshd_config \u306b\u4f9d\u5b58\u3057\u3066\u3044\u308b\u3002<br \/>\n\u305d\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u304c\u3044\u3064\u306e\u307e\u306b\u304b\u65e2\u5b9a\u5024\u306b\u623b\u3063\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u306e\u306f\u6050\u308d\u3057\u3044\u3053\u3068\u3060\u3002<\/p>\n<p>\u306a\u304a\u3001\u305f\u3068\u3048\u3070\u30dd\u30fc\u30c8\u756a\u53f7\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u306f\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u4f9d\u5b58\u3057\u3066\u3044\u306a\u3044\u3002<\/p>\n<p>macOS \u3067\u5916\u90e8\u304b\u3089\u63a5\u7d9a\u3059\u308b ssh \u306e\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u5909\u3048\u305f\u3044\u5834\u5408\u306f\u6b21\u306e\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<p><strong>1) \u30ab\u30b9\u30bf\u30e0 plist \u306e\u7de8\u96c6<\/strong><\/p>\n<p>\u307e\u305a\u30ab\u30b9\u30bf\u30e0 plist \u3092\u7528\u610f\u3059\u308b\u3002 \/Library\/LaunchDaemons\/ssh2.plist \u3092\u4f5c\u6210\u3059\u308b\u3002<br \/>\n\u306a\u304a 99999 \u306e\u3068\u3053\u308d\u306f\u4efb\u610f\u306e\u30dd\u30fc\u30c8\u756a\u53f7\u3092\u6307\u5b9a\u3059\u308b\u3002<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:1000px;height:600px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/>23<br \/>24<br \/>25<br \/>26<br \/>27<br \/>28<br \/>29<br \/>30<br \/>31<br \/>32<br \/>33<br \/>34<br \/>35<br \/>36<br \/>37<br \/>38<br \/>39<br \/>40<br \/>41<br \/>42<br \/>43<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br \/>\n&lt;!DOCTYPE plist PUBLIC &quot;-\/\/Apple\/\/DTD PLIST 1.0\/\/EN&quot; &quot;http:\/\/www.apple.com\/DTDs\/PropertyList-1.0.dtd&quot;&gt;<br \/>\n&lt;plist version=&quot;1.0&quot;&gt;<br \/>\n&lt;dict&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;Disabled&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;true\/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;Label&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;string&gt;com.openssh.sshd2&lt;\/string&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;Program&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;string&gt;\/usr\/libexec\/sshd-keygen-wrapper&lt;\/string&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;ProgramArguments&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;array&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;string&gt;\/usr\/sbin\/sshd&lt;\/string&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;string&gt;-i&lt;\/string&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;\/array&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;Sockets&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;dict&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;Listeners&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;dict&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;SockServiceName&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;string&gt;99999&lt;\/string&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;Bonjour&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;array&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;string&gt;ssh&lt;\/string&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;string&gt;sftp-ssh&lt;\/string&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/array&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;\/dict&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;\/dict&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;inetdCompatibility&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;dict&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;Wait&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;false\/&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;Instances&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;integer&gt;42&lt;\/integer&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;\/dict&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;StandardErrorPath&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;string&gt;\/dev\/null&lt;\/string&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;SHAuthorizationRight&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;string&gt;system.preferences&lt;\/string&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;key&gt;POSIXSpawnType&lt;\/key&gt;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &lt;string&gt;Interactive&lt;\/string&gt;<br \/>\n&lt;\/dict&gt;<br \/>\n&lt;\/plist&gt;<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p><strong>2) plist \u306e\u518d\u30ed\u30fc\u30c9<\/strong><\/p>\n<p>\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6295\u5165\u3002<\/p>\n<div class=\"codecolorer-container text geshi\" style=\"overflow:auto;white-space:nowrap;width:1000px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"text codecolorer\" style=\"white-space:nowrap\">sudo launchctl unload -w \/Library\/LaunchDaemons\/ssh2.plist &amp;&amp; sudo launchctl load -w \/Library\/LaunchDaemons\/ssh2.plist<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>\u3053\u308c\u3067\u826f\u3044\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u5171\u6709\u8a2d\u5b9a\u306f\u5207\u3063\u3066\u304a\u304f\u3002<\/p>\n<p>\u5bfe\u7b56\u3068\u3057\u3066\u306f sshd_config \u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u63a7\u3048\u3066\u304a\u304d\u3001\u65e2\u5b9a\u5024\u306b\u623b\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u305f\u3089\u4e0a\u66f8\u304d\u3059\u308b\u304f\u3089\u3044\u306e\u3082\u306e\u3060\u308d\u3046\u304b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>macOS \u3067\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u30fb\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u3059\u308b\u3068 sshd \u306e\u8a2d\u5b9a\u304c\u65e2\u5b9a\u5024\u306b\u623b\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u3042\u308b\u3088\u3046\u3060\u3002 \u3053\u308c\u306f\u5927\u304d\u306a\u554f\u984c\u3067\u3001\u5916\u90e8\u304b\u3089 ssh \u3092\u63a5\u7d9a\u3059\u308b\u306b\u3042\u305f\u308a\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u3092\u7121\u52b9\u5316\u3057\u3066\u3044\u3066\u3082\u3001\u305d\u308c\u304c\u4e0a\u8a18\u306e\u539f\u56e0\u306e\u305f\u3081 &#8230; <a title=\"macOS \u3067 sshd \u306e\u8a2d\u5b9a\u304c\u65e2\u5b9a\u5024\u306b\u623b\u3063\u3066\u3057\u307e\u3046\u554f\u984c\" class=\"read-more\" href=\"https:\/\/harpuia.id774.net\/entry\/2019\/12\/29\/1494\/\" aria-label=\"macOS \u3067 sshd \u306e\u8a2d\u5b9a\u304c\u65e2\u5b9a\u5024\u306b\u623b\u3063\u3066\u3057\u307e\u3046\u554f\u984c \u306b\u3064\u3044\u3066\u3055\u3089\u306b\u8aad\u3080\">\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-1494","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/harpuia.id774.net\/entry\/wp-json\/wp\/v2\/posts\/1494","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/harpuia.id774.net\/entry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/harpuia.id774.net\/entry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/harpuia.id774.net\/entry\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/harpuia.id774.net\/entry\/wp-json\/wp\/v2\/comments?post=1494"}],"version-history":[{"count":0,"href":"https:\/\/harpuia.id774.net\/entry\/wp-json\/wp\/v2\/posts\/1494\/revisions"}],"wp:attachment":[{"href":"https:\/\/harpuia.id774.net\/entry\/wp-json\/wp\/v2\/media?parent=1494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/harpuia.id774.net\/entry\/wp-json\/wp\/v2\/categories?post=1494"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/harpuia.id774.net\/entry\/wp-json\/wp\/v2\/tags?post=1494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}