{"id":9633,"date":"2016-12-31T03:28:45","date_gmt":"2016-12-30T18:28:45","guid":{"rendered":"http:\/\/www.skyarch.net\/blog\/?p=9633"},"modified":"2021-11-02T17:26:57","modified_gmt":"2021-11-02T08:26:57","slug":"aws-ec2%e3%81%ab%e5%88%9d%e5%9b%9e%e8%b5%b7%e5%8b%95%e6%99%82%e3%81%8b%e3%82%89%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e8%aa%8d%e8%a8%bc%e3%81%a7%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%81%99","status":"publish","type":"post","link":"https:\/\/www.skyarch.net\/blog\/aws-ec2%e3%81%ab%e5%88%9d%e5%9b%9e%e8%b5%b7%e5%8b%95%e6%99%82%e3%81%8b%e3%82%89%e3%83%91%e3%82%b9%e3%83%af%e3%83%bc%e3%83%89%e8%aa%8d%e8%a8%bc%e3%81%a7%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e3%81%99\/","title":{"rendered":"AWS EC2\u306b\u521d\u56de\u8d77\u52d5\u6642\u304b\u3089\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u3067\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>AWS\u306f\u4fbf\u5229\u3067\u3001\u3044\u3064\u3082\u304a\u4e16\u8a71\u306b\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<br \/>\n\u3057\u304b\u3057\u8d77\u52d5\u3057\u305f\u3066\u306eEC2\u306b\u306f\u9375\u8a8d\u8a3c\u3067\u3057\u304b\u5165\u308c\u306a\u3044\u3068\u3044\u3046\u306e\u304c\u5c11\u3005\u9762\u5012\u3060\u3068\u601d\u3046\u3053\u3068\u3082\u3002<br \/>\n\u203b\u9375\u8a8d\u8a3c\u3067\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u78ba\u4fdd\u3057\u3066\u3044\u308b\u306e\u306f\u91cd\u3005\u627f\u77e5\u3067\u3059\u3002<\/p>\n<p>sshd_config\u3092\u7de8\u96c6\u3057\u3066PasswordAuthentication\u3092yes\u306b\u5909\u66f4\u3002<br \/>\n\u3057\u304b\u3057\u305d\u306eEC2\u304b\u3089\u4f5c\u6210\u3057\u305fAMI\u304b\u3089\u8d77\u52d5\u3057\u305fEC2\u3067\u306f\u3001<br \/>\n\u307e\u305fPasswordAuthentication no\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u7d50\u679c\u3001AMI\u304b\u3089\u8d77\u52d5\u3057\u305f\u3066\u306eEC2\u306b\u306f\u3069\u3046\u3057\u3066\u3082\u9375\u8a8d\u8a3c\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u3057\u304b\u7121\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u2026\u3002<br \/>\n\u3053\u308c\u3092\u89e3\u6c7a\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u30d5\u30a1\u30a4\u30eb(\u203b)\u306e[ssh_pwauth]\u3092[false]\u2192[true]\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\u203bAmazon Linux\u306e\u521d\u671f\u8a2d\u5b9a\u3092\u5236\u5fa1\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3067\u3059<\/p>\n<pre># vi \/etc\/cloud\/cloud.cfg.d\/00_defaults.cfg\n\uff5e\nusers:\n  - default\nssh_pwauth: <span style=\"color: #ffff00\"><strong>true<\/strong><\/span>\n\uff5e<\/pre>\n<p>sshd_config\u3092\u7de8\u96c6\u3057\u3066PasswordAuthentication\u3092[no]\u2192[yes]\u306b\u5909\u66f4\u3002<\/p>\n<pre># vi \/etc\/ssh\/sshd_config\n\uff5e\nPasswordAuthentication <span style=\"color: #ffff00\"><strong>yes<\/strong><\/span>\n\uff5e<\/pre>\n<p>\u3053\u306eEC2\u304b\u3089\u53d6\u5f97\u3057\u305fAMI\u304b\u3089\u8d77\u52d5\u3057\u305fEC2\u3067\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u304c\u6709\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u306f\u305a\u3067\u3059\u3002<\/p>\n<p>\u5f8c\u306f\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u3067\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u30e6\u30fc\u30b6\u3068\u305d\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u4f5c\u6210\u3059\u308b\u306e\u3092\u5fd8\u308c\u305a\u306b\u3002<\/p>\n<pre># useradd sato\n# passwd sato<\/pre>\n<p>root\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3082\u8a2d\u5b9a\u3057\u3066\u304a\u304f\u3068\u306a\u304a\u826f\u3057\u3067\u3059\u3002<\/p>\n<pre># passwd root<\/pre>\n<p><span style=\"color: #ff0000\"><strong>\u25a0\u6ce8\u610f\u4e8b\u9805<\/strong><\/span><br \/>\n<span style=\"color: #ff0000\"> \u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u306f\u9375\u8a8d\u8a3c\u3088\u308a\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u304c\u4f4e\u304f\u306a\u308b\u70ba\u3001\u4e00\u6642\u7684\u306a\u691c\u8a3c\u30b5\u30fc\u30d0\u7b49\u3067\u3054\u5229\u7528\u304f\u3060\u3055\u3044\u3002<\/span><br \/>\n<span style=\"color: #ff0000\"> \u307e\u305f\u3001IP\u5236\u9650(\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30b0\u30eb\u30fc\u30d7)\u3092\u4f75\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>AWS\u306f\u4fbf\u5229\u3067\u3001\u3044\u3064\u3082\u304a\u4e16\u8a71\u306b\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002 \u3057\u304b\u3057\u8d77\u52d5\u3057\u305f\u3066\u306eEC2\u306b\u306f\u9375\u8a8d\u8a3c\u3067\u3057\u304b\u5165\u308c\u306a\u3044\u3068\u3044\u3046\u306e\u304c\u5c11\u3005\u9762\u5012\u3060\u3068\u601d\u3046\u3053\u3068\u3082\u3002 \u203b\u9375\u8a8d\u8a3c\u3067\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u78ba\u4fdd\u3057\u3066\u3044\u308b\u306e\u306f\u91cd\u3005\u627f\u77e5\u3067\u3059\u3002 sshd_config\u3092\u7de8\u96c6\u3057\u3066P&#8230;<\/p>\n","protected":false},"author":60,"featured_media":8826,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"9633","footnotes":""},"categories":[20],"tags":[],"class_list":{"0":"post-9633","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-aws","8":"ja"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/9633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/users\/60"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/comments?post=9633"}],"version-history":[{"count":5,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/9633\/revisions"}],"predecessor-version":[{"id":9832,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/posts\/9633\/revisions\/9832"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media\/8826"}],"wp:attachment":[{"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/media?parent=9633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/categories?post=9633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyarch.net\/blog\/wp-json\/wp\/v2\/tags?post=9633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}