{"id":3068,"date":"2021-08-23T22:10:19","date_gmt":"2021-08-23T13:10:19","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=3068"},"modified":"2024-01-31T15:11:53","modified_gmt":"2024-01-31T06:11:53","slug":"ssh-key-%ec%83%9d%ec%84%b1","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=3068","title":{"rendered":"ssh key \uc0dd\uc131(\ube44\ubc00\ubc88\ud638 \uc5c6\uc774 \ub85c\uadf8\uc778)"},"content":{"rendered":"<h1>ssh key \uc0dd\uc131(\ube44\ubc00\ubc88\ud638 \uc5c6\uc774 \ub85c\uadf8\uc778)<\/h1>\n<h2>\ubaa9\ud45c<\/h2>\n<p>ssh \ud0a4\ub97c \uc0dd\uc131\ud558\uace0, \uc11c\ubc84\uc5d0 \ube44\ubc00\ubc88\ud638 \uc5c6\uc774 \uc811\uc18d\ud569\ub2c8\ub2e4.<\/p>\n<h2>ssh \ud0a4 \uc0dd\uc131<\/h2>\n<p>\ud0a4\ub97c \uc0dd\uc131\ud558\ub294 \ubc29\ubc95\uc740 \uc544\ub798\uc640 \uac19\uc774 \uc5ec\ub7ec\uac00\uc9c0 \ubc29\ubc95\uc774 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>git for windows \ub97c \uc774\uc6a9\ud574 \uc0dd\uc131<\/h3>\n<h3>puttygen \uc744 \uc774\uc6a9\ud574 \uc0dd\uc131<\/h3>\n<p><a href=\"https:\/\/jigrid.tistory.com\/2\">\ucc38\uace0<\/a><\/p>\n<p><a href=\"https:\/\/www.puttygen.com\/download.php?val=49\">https:\/\/www.puttygen.com\/download.php?val=49<\/a> \uc5d0\uc11c puttygen \uc744 \ub2e4\uc6b4\ubc1b\uc2b5\ub2c8\ub2e4.<\/p>\n<p><code>puttygen<\/code> \uc744 \uc2e4\ud589\ud569\ub2c8\ub2e4.<a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2021\/08\/2021-08-23-01.png\"><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2021\/08\/2021-08-23-01.png\" alt=\"\" \/><\/a><\/p>\n<p>1\ubc88\uc744 \ub20c\ub7ec \uacf5\uac1c\ud0a4\/\uac1c\uc778\ud0a4\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/p>\n<p>2\ubc88\uc744 \ubcf5\uc0ac\ud574\uc11c \uc11c\ubc84\uc5d0 \ub4f1\ub85d\ud569\ub2c8\ub2e4.(\uc11c\ubc84\uc5d0 \uacf5\uac1c\ud0a4 \ub4f1\ub85d \ucc38\uc870)<\/p>\n<p>3\ubc88\uc744 \ub20c\ub7ec \uac1c\uc778\ud0a4\ub97c \uc800\uc7a5\ud569\ub2c8\ub2e4.(putty \uc6a9 \uac1c\uc778\ud0a4)<\/p>\n<p><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2021\/08\/2024-01-31-01.png\"><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2021\/08\/2024-01-31-01-300x232.png\" alt=\"\" \/><\/a><\/p>\n<p>\uc704 \ubc29\ubc95\uc73c\ub85c openssh \ub97c \uc704\ud55c \uac1c\uc778\ud0a4\ub97c \uc0dd\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>openssh \ub97c \uc774\uc6a9\ud574 \uc0dd\uc131<\/h3>\n<pre><code class=\"language-bash\"># \uae30\uc874\uc5d0 \uc874\uc7ac\ud558\ub294 \ud0a4\ub97c \ud655\uc778\ud558\uace0 \uc911\ubcf5\ub418\uc9c0 \uc54a\ub294 \uc774\ub984\uc758 \ud0a4\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\nls -al ~\/.ssh\/\n\n# \ud30c\uc77c\uba85\uc740 \ud480\ud328\uc2a4\ub97c \uc801\uc5b4\uc8fc\uc5b4\uc57c \ud569\ub2c8\ub2e4.\n# passphrase \ub294 \ube44\ubc00\ubc88\ud638 \uc5c6\uc774 \ub85c\uadf8\uc778\ud558\uae30 \uc704\ud574 \uadf8\ub0e5 \uc5d4\ud130\ub97c \uc785\ub825\ud569\ub2c8\ub2e4.\nssh-keygen\nGenerating public\/private rsa key pair.\nEnter file in which to save the key (\/home\/skyer9\/.ssh\/id_rsa): \/home\/skyer9\/.ssh\/my_rsa\nEnter passphrase (empty for no passphrase):\nEnter same passphrase again:\nYour identification has been saved in \/home\/skyer9\/.ssh\/my_rsa\nYour public key has been saved in \/home\/skyer9\/.ssh\/my_rsa.pub\nThe key fingerprint is:\nSHA256:X0zNXXXXXXXXXXXXXXXXXXugtPLM skyer9@notebook\nThe key&#039;s randomart image is:\n+---[RSA 3072]----+\n|          .+o*o..|\n|          xxxxxxx|\n|          xxxxxxx|\n|          xxxxxxx|\n|        xxxxxxxxx|\n|         xxxxxxxx|\n|          ++ + + |\n|          .B= +  |\n|         .oEO=oo |\n+----[SHA256]-----+\n\ncat ~\/.ssh\/my_rsa\ncat ~\/.ssh\/my_rsa.pub<\/code><\/pre>\n<h2>\uc11c\ubc84\uc5d0 \uacf5\uac1c\ud0a4 \ub4f1\ub85d<\/h2>\n<p><a href=\"https:\/\/opentutorials.org\/module\/432\/3742\">\ucc38\uace0<\/a><\/p>\n<p>\uad8c\ud55c \uc124\uc815\uc744 \uc544\ub798\uc640 \uac19\uc774 \ud574\uc90d\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">chmod g-w \/home\/your_user\nchmod 700 \/home\/your_user\/.ssh\nchmod 600 \/home\/your_user\/.ssh\/authorized_keys<\/code><\/pre>\n<p>\uc704\uc5d0\uc11c \uc0dd\uc131\ud55c \uacf5\uac1c\ud0a4\ub97c \uc544\ub798 \ud30c\uc77c\uc5d0 \ucd94\uac00\ud574\uc90d\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">vi \/home\/your_user\/.ssh\/authorized_keys<\/code><\/pre>\n<p>\uc8fc\uc758 : PuTTY \uc640 OpenSSH \ub294 \uc11c\ub85c \ub2e4\ub978 \ud615\uc2dd\uc758 \ud3ec\uba67\uc744 \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<br \/>\n\uacf5\uac1c\ud0a4\uac00 &quot;&#8212;- BEGIN SSH2 PUBLIC KEY &#8230;&quot; \uc774\ub7f0 \ud615\uc2dd\uc73c\ub85c \ub418\uc5b4 \uc788\ub2e4\uba74 \uc774\uac83\uc740 OpenSSH \uac00 \uc778\uc2dd\ud558\uc9c0 \ubabb\ud558\ub294 \ud3ec\uba67\uc785\ub2c8\ub2e4.<br \/>\n&quot;ssh-rsa AAAA &#8230;.&quot; \uc640 \uac19\uc774 \ud55c\uc904\ub85c \ub418\uc5b4 \uc788\uc5b4\uc57c OpenSSH \uac00 \uc778\uc2dd\ud558\ub294 \uc815\uc0c1\uc801\uc778 \ud3ec\uba67\uc785\ub2c8\ub2e4.<\/p>\n<p><font color=red>NOTE: PuTTY and OpenSSH use different formats for public SSH keys. If the SSH Key you copied starts with &quot;&#8212;- BEGIN SSH2 PUBLIC KEY &#8230;&quot;, it is in the wrong format. Be sure to follow the instructions carefully. Your key should start with &quot;ssh-rsa AAAA &#8230;.&quot;<\/font><\/p>\n<p>\uc544\ub798 \uc124\uc815\uc73c\ub85c \uacf5\uac1c\ud0a4 \uc811\uc18d\uc744 \ud65c\uc131\ud654 \ud6c4 \uc811\uc18d\uc744 \uc2dc\ub3c4\ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">sudo vi \/etc\/ssh\/sshd_config\n......\nPubkeyAuthentication yes\n......\n\nsudo service sshd restart<\/code><\/pre>\n<h2>\uac1c\uc778\ud0a4\ub97c \uc774\uc6a9\ud574 \uc811\uc18d<\/h2>\n<p>\uc704\uc5d0\uc11c \uc0dd\uc131\ud55c \uac1c\uc778\ud0a4\ub97c putty \uc5d0 \uc124\uc815 \ud6c4 \uc811\uc18d\ud569\ub2c8\ub2e4.<\/p>\n<p><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2021\/08\/2021-08-23-02.png\"><img decoding=\"async\" src=\"https:\/\/www.skyer9.pe.kr\/wordpress\/wp-content\/uploads\/2021\/08\/2021-08-23-02.png\" alt=\"\" \/><\/a><\/p>\n<h2>\ube44\ubc00\ubc88\ud638 \ub85c\uadf8\uc778 \ube44\ud65c\uc131\ud654<\/h2>\n<p>\uc811\uc18d\uc774 \uc131\uacf5\ud55c \ud6c4 \ube44\ubc00\ubc88\ud638\ub97c \uc774\uc6a9\ud55c \ub85c\uadf8\uc778\uc744 \uc81c\ud55c\ud569\ub2c8\ub2e4.<br \/>\n\ub9cc\uc57d \ud55c\ubc88\uc5d0 \uc124\uc815\uc744 \ud588\ub2e4\uac00 \uacf5\uac1c\ud0a4 \uc778\uc99d\uc774 \uc2e4\ud328\ud558\uba74 \ud655\uc815\uc801\uc73c\ub85c \uc544\ubb34\ub7f0 \ub85c\uadf8\uc778 \uc218\ub2e8\uc774 \uc5c6\ub294 \uc0c1\ud0dc\uac00 \ub429\ub2c8\ub2e4.<br \/>\n\uc131\uacf5\uc744 \ud655\uc778 \ud6c4 \uc544\ub798 \uba85\ub839\uc744 \uc218\ud589\ud558\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">sudo vi \/etc\/ssh\/sshd_config\n......\nPasswordAuthentication no\n......\n\nsudo service sshd restart<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ssh key \uc0dd\uc131(\ube44\ubc00\ubc88\ud638 \uc5c6\uc774 \ub85c\uadf8\uc778) \ubaa9\ud45c ssh \ud0a4\ub97c \uc0dd\uc131\ud558\uace0, \uc11c\ubc84\uc5d0 \ube44\ubc00\ubc88\ud638 \uc5c6\uc774 \uc811\uc18d\ud569\ub2c8\ub2e4. ssh \ud0a4 \uc0dd\uc131 \ud0a4\ub97c \uc0dd\uc131\ud558\ub294 \ubc29\ubc95\uc740 \uc544\ub798\uc640 \uac19\uc774 \uc5ec\ub7ec\uac00\uc9c0 \ubc29\ubc95\uc774 \uc788\uc2b5\ub2c8\ub2e4. git for windows \ub97c \uc774\uc6a9\ud574 \uc0dd\uc131 puttygen \uc744 \uc774\uc6a9\ud574 \uc0dd\uc131 \ucc38\uace0 https:\/\/www.puttygen.com\/download.php?val=49 \uc5d0\uc11c puttygen \uc744 \ub2e4\uc6b4\ubc1b\uc2b5\ub2c8\ub2e4. puttygen \uc744 \uc2e4\ud589\ud569\ub2c8\ub2e4. 1\ubc88\uc744 \ub20c\ub7ec \uacf5\uac1c\ud0a4\/\uac1c\uc778\ud0a4\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4. 2\ubc88\uc744 \ubcf5\uc0ac\ud574\uc11c \uc11c\ubc84\uc5d0 \ub4f1\ub85d\ud569\ub2c8\ub2e4.(\uc11c\ubc84\uc5d0 \uacf5\uac1c\ud0a4 \ub4f1\ub85d \ucc38\uc870) 3\ubc88\uc744\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=3068\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-3068","post","type-post","status-publish","format-standard","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3068"}],"version-history":[{"count":13,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3068\/revisions"}],"predecessor-version":[{"id":8480,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/3068\/revisions\/8480"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}