{"id":4772,"date":"2021-08-24T10:11:58","date_gmt":"2021-08-24T01:11:58","guid":{"rendered":"\/blog\/?p=4772"},"modified":"2023-09-21T09:26:31","modified_gmt":"2023-09-21T00:26:31","slug":"ssh-key%eb%a5%bc-%ed%86%b5%ed%95%9c-%eb%a1%9c%ea%b7%b8%ec%9d%b8","status":"publish","type":"post","link":"https:\/\/hasu0707.duckdns.org\/blog\/?p=4772","title":{"rendered":"SSH Key\ub97c \ud1b5\ud55c \ub85c\uadf8\uc778"},"content":{"rendered":"\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">10.10.10.50\u219210.10.10.51 \uc73c\ub85c \uc811\uc18d\ud55c\ub2e4\uace0 \uac00\uc815.\n\n\u25a010.10.10.51\nmkdir ~\/.ssh\n\n\u25a010.10.10.50\nssh-keygen -q -t rsa -f ~\/.ssh\/vid_rsa -N ''\n\uc774\ub807\uac8c \ud558\uba74 ~\/.ssh\uc5d0 vid_rsa, vid_rsa.pub \ub450\uac1c\uc758 \ud30c\uc77c\uc774 \uc0dd\uc131\ub41c\ub2e4.\nvid_rsa\ub294 \uac1c\uc778\ud0a4, vid_rsa.pub\ub294 \uacf5\uac1c\ud0a4\ub85c \uc811\uc18d\ud558\ub824\ub294 \uc11c\ubc84\uc5d0 authorized_keys \ud30c\uc77c\uba85\uc73c\ub85c \uacf5\uac1c\ud0a4\ub97c \ub123\uc5b4 \uc8fc\uc5b4\uc57c \ud55c\ub2e4.\n\n# \ud37c\ubbf8\uc158 \uc870\uc815\nchmod 600 ~\/.ssh\/vid_rsa\nchmod 644 ~\/.ssh\/vid_rsa.pub\n\n# Removes all keys belonging to hostname from a known_hosts file.\nssh-keygen -R 10.10.10.51\n\n# \uacf5\uac1c\ud0a4 \ubcf5\uc0ac\ubcf8 \ub9cc\ub4e4\uae30\ncp ~\/.ssh\/vid_rsa.pub .\/authorized_keys\n\n# \uacf5\uac1c\ud0a4 \uc804\uc1a1\nscp .\/authorized_keys root@10.10.10.51:\/root\/.ssh\/\n\n\u25a0\ud14c\uc2a4\ud2b8\n\n10.10.10.50\uc5d0\uc11c...\nssh -i ~\/.ssh\/vid_rsa root@10.10.10.51\n<\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[12],"tags":[],"class_list":["post-4772","post","type-post","status-publish","format-standard","hentry","category-computing_security"],"_links":{"self":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4772"}],"version-history":[{"count":0,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4772\/revisions"}],"wp:attachment":[{"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hasu0707.duckdns.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}