{"id":1568,"date":"2006-09-09T15:12:00","date_gmt":"2006-09-09T15:12:00","guid":{"rendered":"http:\/\/gleamynode.net\/articles\/1568\/passwordless-login-with-ssh"},"modified":"2022-12-28T01:47:37","modified_gmt":"2022-12-27T16:47:37","slug":"passwordless-login-with-ssh","status":"publish","type":"post","link":"https:\/\/vault.motd.kr\/wordpress\/posts\/1568\/passwordless-login-with-ssh\/","title":{"rendered":"Passwordless Login with SSH"},"content":{"rendered":"
\uc6b0\uc120 OpenSSL \uacfc OpenSSH \uac00 \uc124\uce58\ub418\uc5b4 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4. \uc708\ub3c4\uc6b0\uc988\uc5d0\uc11c\ub294 cygwin \ubc84\uc804\uc744 \uc0ac\uc6a9\ud558\uc138\uc694. \ub85c\uceec \uba38\uc2e0\uc5d0\uc11c \ub2e4\uc74c\uc744 \uc2e4\ud589\ud569\ub2c8\ub2e4: <\/p>\n
\n
ssh-keygen -t rsa -b <\ube44\ud2b8\uc218 (2048)><\/p><\/blockquote>\n
Private key \uc5d0 \ub300\ud55c passphrase \ub97c \ubb3b\uac8c \ub418\ub294\ub370 \uc785\ub825\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.<\/p>\n
\uc0dd\uc131\uc774 \uc644\ub8cc \ub418\uba74 ~\/.ssh\/<\/span> \uc5d0 id_rsa<\/span> (private key) \uc640 id_rsa.pub<\/span> (public key) \ud30c\uc77c\uc774 \uc0dd\uc131\ub41c \uac83\uc744 \uc54c \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n
\ub9c8\uc9c0\ub9c9\uc73c\ub85c \uad8c\ud55c\uc744 \uc124\uc815\ud569\ub2c8\ub2e4 (\uc708\ub3c4\uc6b0\uc988\uc5d0\uc11c\ub3c4 \ubc18\ub4dc\uc2dc \ud558\uc154\uc57c \ud569\ub2c8\ub2e4):<\/p>\n
\n
chmod 600 ~\/.ssh\/id_rsa*<\/p><\/blockquote>\n
\uc774\uc81c \uc6d0\uaca9\uc9c0 \uc2dc\uc2a4\ud15c\uc5d0 \ub85c\uadf8\uc778\ud558\uc5ec ~\/.ssh<\/span> \ub514\ub809\ud1a0\ub9ac\uc5d0 \ub4e4\uc5b4\uac00\uc11c (\uc5c6\ub2e4\uba74 \ub9cc\ub4dc\uc138\uc694) authorized_keys<\/span> \ud30c\uc77c\uc744 \uc5fd\ub2c8\ub2e4. (\uc5ed\uc2dc \uc5c6\ub2e4\uba74 \ub9cc\ub4dc\uc138\uc694) \ud30c\uc77c\uc758 \ub9c8\uc9c0\ub9c9 \ubd80\ubd84\uc5d0 id_rsa.pub<\/span> \ud30c\uc77c\uc758 \ub0b4\uc6a9\uc744 \ucd94\uac00\ud558\uace0 \uc800\uc7a5\ud55c \ub4a4, \uad8c\ud55c\uc744 \uc124\uc815\ud569\ub2c8\ub2e4:<\/p>\n
\n
chmod 644 authorized_keys<\/p><\/blockquote>\n
\uc774\uc81c \ube44\ubc00\ubc88\ud638 \uc5c6\uc774 SSH \ub97c \ud1b5\ud574 \ub85c\uadf8\uc778\ud558\uc2e4 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub2e4\uc74c \uba85\ub839\uc73c\ub85c \ud0a4\ub97c \uc0dd\uc131\ud55c \ub85c\uceec \uba38\uc2e0\uc5d0\uc11c \ud14c\uc2a4\ud2b8\ud574 \ubcfc \uc218 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n
\n
ssh <\uc0ac\uc6a9\uc790\uba85>@<\ud638\uc2a4\ud2b8\uba85> ‘echo Hello, World!’<\/p><\/blockquote>\n
\uc544\ubb34 \uc5d0\ub7ec \uc5c6\uc774 \uc885\ub8cc\ub418\uba74 \uc131\uacf5\uc785\ub2c8\ub2e4.<\/p>\n
\ub9cc\uc57d \uc791\uc5c5\ud558\ub294 \uba38\uc2e0\uc774 \uc5ec\ub7ec\uac1c\ub77c\uba74 \uac01\uac01\uc758 \uba38\uc2e0\uc5d0\uc11c \ub3d9\uc77c\ud55c \uc791\uc5c5\uc744 \uc218\ud589\ud574 \uc8fc\uc154\uc57c \ud569\ub2c8\ub2e4. \ub610, \uc6d0\uaca9\uc9c0 \uba38\uc2e0\uc5d0 OpenSSH \uac00 \uc544\ub2cc \ub2e4\ub978 SSH \uac00 \uc124\uce58\ub418\uc5b4 \uc788\ub2e4\uba74 (e.g. Solaris), \uc5ec\uae30<\/a>\uc5d0\uc11c \ub354 \uc790\uc138\ud55c \uc815\ubcf4\ub97c \uc5bb\uc73c\uc2ed\uc2dc\uc624.\n<\/p>\n
PS: \uc5ec\uc804\uc5d0 \uc791\uc131\ud588\ub358 ‘Maven \uc5d0\uc11c Password \uc5c6\uc774 Deploy \ud558\uae30’\uc5d0\uc11c Passwordless login \ubd80\ubd84\ub9cc \ubf51\uc544 \ub2e4\uc2dc \uc791\uc131\ud55c \uae00\uc785\ub2c8\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"
\uc6b0\uc120 OpenSSL \uacfc OpenSSH \uac00 \uc124\uce58\ub418\uc5b4 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4. \uc708\ub3c4\uc6b0\uc988\uc5d0\uc11c\ub294 cygwin \ubc84\uc804\uc744 \uc0ac\uc6a9\ud558\uc138\uc694. \ub85c\uceec \uba38\uc2e0\uc5d0\uc11c \ub2e4\uc74c\uc744 \uc2e4\ud589\ud569\ub2c8\ub2e4: ssh-keygen -t rsa -b <\ube44\ud2b8\uc218 (2048)> Private key \uc5d0 \ub300\ud55c passphrase \ub97c \ubb3b\uac8c \ub418\ub294\ub370 \uc785\ub825\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \uc0dd\uc131\uc774 \uc644\ub8cc \ub418\uba74 ~\/.ssh\/ \uc5d0 id_rsa (private key) \uc640 id_rsa.pub (public key) \ud30c\uc77c\uc774 \uc0dd\uc131\ub41c \uac83\uc744 \uc54c \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ub9c8\uc9c0\ub9c9\uc73c\ub85c \uad8c\ud55c\uc744 \uc124\uc815\ud569\ub2c8\ub2e4 (\uc708\ub3c4\uc6b0\uc988\uc5d0\uc11c\ub3c4 \ubc18\ub4dc\uc2dc… Continue reading