{"id":232,"date":"2018-04-03T10:45:26","date_gmt":"2018-04-02T22:45:26","guid":{"rendered":"https:\/\/content.ronella.xyz\/apps\/wordpress\/?p=232"},"modified":"2018-04-03T14:00:14","modified_gmt":"2018-04-03T02:00:14","slug":"using-putty-ssh-key-pair","status":"publish","type":"post","link":"https:\/\/www.ronella.xyz\/?p=232","title":{"rendered":"Using Putty SSH Key Pair"},"content":{"rendered":"<ol style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\" type=\"1\">\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\" value=\"1\"><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\">Login to <\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: bold; font-style: normal;\">your account<\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\"> on the <\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: bold; font-style: normal;\">remote server<\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\">.<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\" value=\"2\"><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\">Create a file <\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: bold; font-style: normal;\">~\/.ssh\/authorized_keys<\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\"> file and placed in the putty public key with the following format:<\/span><\/li>\n<\/ol>\n<pre style=\"margin: 0in; margin-left: .375in; font-family: Calibri; font-size: 11.0pt;\">ssh-rsa &lt;PUBLIC_KEY&gt; &lt;KEY_COMMENT&gt;<\/pre>\n<p style=\"margin: 0in; margin-top: 0.25in; margin-left: .375in; font-family: Calibri; font-size: 11.0pt;\"><span style=\"font-style: italic;\">Note: If you don\u2019t have a public key generated you can follow the procedure from <\/span><a href=\"https:\/\/www.ronella.xyz\/wordpress\/?p=226\"><span style=\"font-style: italic;\">Generating Putty SSH Key Pair<\/span><\/a><span style=\"font-style: italic;\">.<\/span><\/p>\n<p style=\"margin: 0in; margin-left: .375in; margin-top: .25in; font-family: Calibri; font-size: 11.0pt;\">If the file already exists then append the public key on a <span style=\"font-weight: bold;\">new line<\/span> with the same format specified earlier.<\/p>\n<ol style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\" type=\"1\">\n<li style=\"margin-top: .25in; margin-bottom: 0; vertical-align: middle;\" value=\"3\"><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\">If necessary update the permission of the <\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: bold; font-style: normal;\">authorized_keys <\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\">file with the following command:<\/span><\/li>\n<\/ol>\n<pre style=\"margin: 0in; margin-top: .25in; margin-left: .375in; font-family: Calibri; font-size: 11.0pt;\">chmod 600 ~\/.ssh\/authorized_keys<\/pre>\n<ol style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\" type=\"1\">\n<li style=\"margin-top: .25in; margin-bottom: 0; vertical-align: middle;\" value=\"4\"><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\">If necessary update the permission of the <\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: bold; font-style: normal;\">.ssh<\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\"> directory with the following command:<\/span><\/li>\n<\/ol>\n<pre style=\"margin: 0in; margin-top: .25in; margin-left: .375in; font-family: Calibri; font-size: 11.0pt;\">chmod 700 ~\/.ssh<\/pre>\n<ol style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\" type=\"1\">\n<li style=\"margin-top: 0.25in; margin-bottom: 0; vertical-align: middle;\" value=\"5\"><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\">Setup the <\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: bold; font-style: normal;\">Pageant<\/span> <span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: italic;\">(see <\/span><a href=\"https:\/\/www.ronella.xyz\/wordpress\/?p=228\"><span style=\"font-family: Calibri; font-size: 11.0pt; font-style: italic;\">Using Pageant to hold the Putty Private Key<\/span><\/a><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: italic;\">)<\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\"> to hold the private key <\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: italic;\">(and passphrase)<\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\">. <\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\" value=\"6\"><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\">Run the <\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: bold; font-style: normal;\">Putty<\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\"> application.<\/span><\/li>\n<li style=\"margin-top: 0; margin-bottom: 0; vertical-align: middle;\" value=\"7\"><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\">Fill-up <\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: bold; font-style: normal;\">Host Name (or IP Address)<\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\"> field with the following format:<\/span><\/li>\n<\/ol>\n<pre style=\"margin: 0in; margin-top: .25in; margin-left: .375in; font-family: Calibri; font-size: 11.0pt;\">&lt;USERNAME&gt;@&lt;HOST_NAME_OR_IP_ADDRESS&gt;<\/pre>\n<p style=\"margin: 0in; margin-top: .25in; margin-left: .375in; font-family: Calibri; font-size: 11.0pt;\">Where fields are defined as follows:<\/p>\n<p style=\"margin: .25in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;\">&lt;USERNAME&gt; is the account name used on step 1.<\/p>\n<p style=\"margin: 0in 0in 0in 0.375in; font-family: Calibri; font-size: 11pt;\">&lt;HOST_NAME_OR_IP_ADDRESS&gt; is the remote server used on step 1.<\/p>\n<p style=\"margin: 0in; margin-top: .25in; margin-left: .375in; font-family: Calibri; font-size: 11.0pt;\">Example<\/p>\n<p style=\"margin: 0in; margin-top: .25in; margin-left: .375in; font-family: Calibri; font-size: 11.0pt;\">user@someserver.com<\/p>\n<p style=\"margin: 0in; margin-left: .375in; font-family: Calibri; font-size: 11.0pt;\">user@192.168.1.200<\/p>\n<ol style=\"margin-left: .375in; direction: ltr; unicode-bidi: embed; margin-top: 0in; margin-bottom: 0in; font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\" type=\"1\">\n<li style=\"margin-top: .25in; margin-bottom: 0; vertical-align: middle;\" value=\"8\"><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\">Click the <\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: bold; font-style: normal;\">Open button<\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\"> and expect to be connected to the remote server without it asking you to provide your password <\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: italic;\">(or even your passphrase)<\/span><span style=\"font-family: Calibri; font-size: 11.0pt; font-weight: normal; font-style: normal;\">. <\/span><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Login to your account on the remote server. Create a file ~\/.ssh\/authorized_keys file and placed in the putty public key with the following format: ssh-rsa &lt;PUBLIC_KEY&gt; &lt;KEY_COMMENT&gt; Note: If you don\u2019t have a public key generated you can follow the procedure from Generating Putty SSH Key Pair. If the file already exists then append the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[26,27,10],"tags":[],"_links":{"self":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/232"}],"collection":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=232"}],"version-history":[{"count":3,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/232\/revisions"}],"predecessor-version":[{"id":235,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=\/wp\/v2\/posts\/232\/revisions\/235"}],"wp:attachment":[{"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ronella.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}