{"id":3659,"date":"2015-09-04T03:30:23","date_gmt":"2015-09-04T08:30:23","guid":{"rendered":"http:\/\/www.filecloud.com\/blog\/?page_id=3659"},"modified":"2022-03-04T09:35:35","modified_gmt":"2022-03-04T15:35:35","slug":"ssh-without-password-using-putty","status":"publish","type":"page","link":"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/","title":{"rendered":"SSH Login Without Saving a Password Using Putty | FileCloud"},"content":{"rendered":"<h1>SSH (Secure Shell) without password using Putty<\/h1>\n<p><span style=\"text-decoration: underline;\"><strong>SSH Protocol<br \/>\n<\/strong><\/span><\/p>\n<p>SSH (Secure Shell) is a network protocol that provides secure access to a computer (mostly Unix based). When you want to connect to a remote Unix server, SSH is one way of accessing the server. SSH is very powerful by combining both security of the data transmitted over network and accessibility to the remote system. SSH protocol works between two computers by a client-server architecture. When a client computer connects to the server, the server requires the client to authenticate itself. There are different ways a client can authenticate itself to the server. A typical authentication mode will be to enter a password when logging into a remote system. In this howto we can explore another mode of authentication in which server doesn\u2019t require a password to be entered by the user. This mode will be very useful if you are connecting to a remote system frequently and dont want to enter the password everytime.<\/p>\n<p>Before we see the steps, just to give a background on the components involved:<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>SSH SERVER<\/strong><\/span><\/p>\n<p>When you need to connect to a remote computer via SSH, that computer should have a SSH server running on it. All Unix based distributions ( Linux, Mac OSX etc.,) includes a ssh server. For Windows based systems Cygwin can be used as an SSH server.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>SSH CLIENT<\/strong><\/span><\/p>\n<p>Assuming your remote computer has an SSH server running on it, to connect to that computer you would need a SSH client on the local computer. On Unix based systems, SSH clients are available as command line utilities. For Windows based systems, putty is an excellent client. Check <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/\" target=\"_blank\" rel=\"noopener noreferrer\">here <\/a>for more information about putty.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>CONFIGURATION<\/strong><\/span><\/p>\n<ol>\n<li>We start the configuration at the client windows computer. Download the latest version of Putty.exe and Puttygen.exe from <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/\" target=\"_blank\" rel=\"noopener noreferrer\">here.<\/a> Using the Puttygen tool we have to generate an authentication key. This key will serve as a substitute for the password that will be entered during login.<a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/\" target=\"_blank\" rel=\"noopener noreferrer\"><br \/>\n<\/a><\/li>\n<li>Start puttygen.exe by double clicking on the executable. The following window opens up.\n<div id=\"attachment_507\" style=\"width: 516px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-507\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-507\" title=\"puttygen window\" src=\"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2015\/09\/sshot-11.png\" alt=\"puttygen window\" width=\"506\" height=\"495\"><\/p>\n<p id=\"caption-attachment-507\" class=\"wp-caption-text\">Puttygen Window<\/p>\n<\/div>\n<\/li>\n<li>Leave the default \u2018SSH-2 RSA\u2019 selection and click on the \u2018Generate\u2019 button. The following window opens. Move mouse randomly over the empty space below the progress bar to create some randomness in the generated key.\n<div id=\"attachment_509\" style=\"width: 516px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-509\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-509\" title=\"Key generation\" src=\"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2015\/09\/sshot-2.png\" alt=\"RSA key generation by Puttygen\" width=\"506\" height=\"496\"><\/p>\n<p id=\"caption-attachment-509\" class=\"wp-caption-text\">RSA key generation by Puttygen<\/p>\n<\/div>\n<\/li>\n<li>Don\u2019t enter any key phrase. Click on \u2018Save private Key\u2019 button. Click \u2018Yes\u2019 on the window asking for confirmation for saving the key without a password.\n<div id=\"attachment_510\" style=\"width: 516px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-510\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-510\" title=\"Key generated\" src=\"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2015\/09\/sshot-3.png\" alt=\"Key generated successfully\" width=\"506\" height=\"494\"><\/p>\n<p id=\"caption-attachment-510\" class=\"wp-caption-text\">Key generated successfully<\/p>\n<\/div>\n<\/li>\n<li>Save the key file to a safe location (Let us assume you will be saving it as C:PersonalSSHKeyLaptop.ppk).<\/li>\n<li>Now you can close the Puttygen window.<\/li>\n<li>Open the Laptop.ppk file in a notepad. Copy the four lines under \u2018Public-Lines\u2019 section to windows clipboard.\n<div id=\"attachment_511\" style=\"width: 589px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-511\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-511\" title=\"Private Key File\" src=\"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2015\/09\/sshot-4.png\" alt=\"Copy Public Key Section\" width=\"579\" height=\"373\"><\/p>\n<p id=\"caption-attachment-511\" class=\"wp-caption-text\">Copy Public Key Section<\/p>\n<\/div>\n<\/li>\n<li>Now open putty and connect to the remote system using the user id you want to use for future no password connections. (Let us assume you will connect to the remote machine using user name \u2018ubu\u2019. This time when you login, you have to provide the password at the prompt. Future logins won\u2019t require this password.<\/li>\n<li>Under the logged in user\u2019s home directory there will be .ssh directory, under that create a new file called authorized_keys using a text editor such as vi. (In our case the file will be created under \/home\/ubu\/.ssh\/authorized_keys).<\/li>\n<li>Type the word \u201d ssh-rsa \u201d (including spaces on both ends of the word) and paste the 4 lines copied from step 7. Remove the carriage return at end of each line, merging four lines into one single line. Be careful not to delete any characters while doing that. Final output should like the following window.\n<div id=\"attachment_512\" style=\"width: 700px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-512\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-512\" title=\"authorized_keys file\" src=\"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2015\/09\/sshot-5.png\" alt=\"Add generated key to remote system\" width=\"690\" height=\"443\"><\/p>\n<p id=\"caption-attachment-512\" class=\"wp-caption-text\">Add generated key to remote system<\/p>\n<\/div>\n<\/li>\n<li>Save the file and quit the text editor. Assign rw permissions only for the owner. $ chmod 600 ~\/.ssh\/authorized_keys.\n<div id=\"attachment_513\" style=\"width: 702px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-513\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-513\" title=\"Set file permissions for authorized_keys\" src=\"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2015\/09\/sshot-6.png\" alt=\"Set file permissions\" width=\"692\" height=\"81\"><\/p>\n<p id=\"caption-attachment-513\" class=\"wp-caption-text\">Set file permissions<\/p>\n<\/div>\n<\/li>\n<li>Now we have configured SSH server, its time to test our setup.<\/li>\n<li>On the local system, open Putty, enter the ip address details of the remote system.<\/li>\n<li>Now from the left navigation, select Connection -&gt; Data. Enter \u2018ubu\u2019 as \u2018Auto-login username\u2019 on the right panel.\n<div id=\"attachment_514\" style=\"width: 490px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-514\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-514\" title=\"Enter default user\" src=\"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2015\/09\/sshot-7.png\" alt=\"Enter User name on Putty\" width=\"480\" height=\"465\"><\/p>\n<p id=\"caption-attachment-514\" class=\"wp-caption-text\">Enter User name on Putty<\/p>\n<\/div>\n<\/li>\n<li>Again from the left navigation menu, scroll down and select Connection -&gt; SSH -&gt; Auth. Enter the path of the saved private key file ( In our case C:PersonalSSHKeyLaptop.ppk ). Leave other defaults as such and press open button.\n<div id=\"attachment_515\" style=\"width: 489px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-515\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-515\" title=\"Enter key location\" src=\"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2015\/09\/sshot-8.png\" alt=\"Specify key file location\" width=\"479\" height=\"465\"><\/p>\n<p id=\"caption-attachment-515\" class=\"wp-caption-text\">Specify key file location<\/p>\n<\/div>\n<\/li>\n<li>Now the putty connects to the remote SSH server and there won\u2019t be any password prompt here after :-).\n<div id=\"attachment_508\" style=\"width: 701px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-508\" decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-508\" title=\"Passwordless entry\" src=\"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2015\/09\/sshot-9.png\" alt=\"No Password Connection\" width=\"691\" height=\"443\"><\/p>\n<p id=\"caption-attachment-508\" class=\"wp-caption-text\">No Password Connection<\/p>\n<\/div>\n<\/li>\n<\/ol>\n<p><span style=\"text-decoration: underline;\"><strong>Caution<\/strong><\/span><br \/>\nSSH is a powerful tool and relies on password as a security. We just bypassed that security for sake of convenience. If a hacker get holds of the private key we generated, it allows a free access to your systems. So use this technique with care.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SSH (Secure Shell) without password using Putty SSH Protocol SSH (Secure Shell) is a network protocol that provides secure access to a computer (mostly Unix based). When you want to connect to a remote Unix server, SSH is one way of accessing the server. SSH is very powerful by combining both security of the data [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.13 (Yoast SEO v20.13) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SSH Login Without Saving a Password Using Putty | FileCloud<\/title>\n<meta name=\"description\" content=\"Use Putty to safely login to SSH without saving or entering a password. SSH is a network protocol that provides secure access to a computer (mostly Unix based).\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SSH Login Without Saving a Password Using Putty | FileCloud\" \/>\n<meta property=\"og:description\" content=\"Use Putty to safely login to SSH without saving or entering a password. SSH is a network protocol that provides secure access to a computer (mostly Unix based).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/\" \/>\n<meta property=\"og:site_name\" content=\"FileCloud blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/tonidopage\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-04T15:35:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2015\/09\/sshot-11.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@getfilecloud\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/\",\"url\":\"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/\",\"name\":\"SSH Login Without Saving a Password Using Putty | FileCloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.filecloud.com\/blog\/#website\"},\"datePublished\":\"2015-09-04T08:30:23+00:00\",\"dateModified\":\"2022-03-04T15:35:35+00:00\",\"description\":\"Use Putty to safely login to SSH without saving or entering a password. SSH is a network protocol that provides secure access to a computer (mostly Unix based).\",\"breadcrumb\":{\"@id\":\"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.filecloud.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SSH Login Without Saving a Password Using Putty | FileCloud\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.filecloud.com\/blog\/#website\",\"url\":\"https:\/\/www.filecloud.com\/blog\/\",\"name\":\"FileCloud blog\",\"description\":\"Topics on Private cloud, On-Premises, Self-Hosted, Enterprise File Sync and Sharing\",\"publisher\":{\"@id\":\"https:\/\/www.filecloud.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.filecloud.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.filecloud.com\/blog\/#organization\",\"name\":\"FileCloud\",\"url\":\"https:\/\/www.filecloud.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.filecloud.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2016\/02\/filecloud_logo_comparison.jpg\",\"contentUrl\":\"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2016\/02\/filecloud_logo_comparison.jpg\",\"width\":155,\"height\":40,\"caption\":\"FileCloud\"},\"image\":{\"@id\":\"https:\/\/www.filecloud.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/tonidopage\",\"https:\/\/twitter.com\/getfilecloud\",\"https:\/\/www.linkedin.com\/company\/codelathe\",\"https:\/\/www.pinterest.com\/filecloud\/filecloud\/\",\"https:\/\/www.youtube.com\/channel\/UCbU5gTFdNCPESA5aGipFW6g\"]}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SSH Login Without Saving a Password Using Putty | FileCloud","description":"Use Putty to safely login to SSH without saving or entering a password. SSH is a network protocol that provides secure access to a computer (mostly Unix based).","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/","og_locale":"en_US","og_type":"article","og_title":"SSH Login Without Saving a Password Using Putty | FileCloud","og_description":"Use Putty to safely login to SSH without saving or entering a password. SSH is a network protocol that provides secure access to a computer (mostly Unix based).","og_url":"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/","og_site_name":"FileCloud blog","article_publisher":"https:\/\/www.facebook.com\/tonidopage","article_modified_time":"2022-03-04T15:35:35+00:00","og_image":[{"url":"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2015\/09\/sshot-11.png"}],"twitter_card":"summary_large_image","twitter_site":"@getfilecloud","twitter_misc":{"Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/","url":"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/","name":"SSH Login Without Saving a Password Using Putty | FileCloud","isPartOf":{"@id":"https:\/\/www.filecloud.com\/blog\/#website"},"datePublished":"2015-09-04T08:30:23+00:00","dateModified":"2022-03-04T15:35:35+00:00","description":"Use Putty to safely login to SSH without saving or entering a password. SSH is a network protocol that provides secure access to a computer (mostly Unix based).","breadcrumb":{"@id":"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.filecloud.com\/blog\/ssh-without-password-using-putty\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.filecloud.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SSH Login Without Saving a Password Using Putty | FileCloud"}]},{"@type":"WebSite","@id":"https:\/\/www.filecloud.com\/blog\/#website","url":"https:\/\/www.filecloud.com\/blog\/","name":"FileCloud blog","description":"Topics on Private cloud, On-Premises, Self-Hosted, Enterprise File Sync and Sharing","publisher":{"@id":"https:\/\/www.filecloud.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.filecloud.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.filecloud.com\/blog\/#organization","name":"FileCloud","url":"https:\/\/www.filecloud.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.filecloud.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2016\/02\/filecloud_logo_comparison.jpg","contentUrl":"https:\/\/www.filecloud.com\/blog\/wp-content\/uploads\/2016\/02\/filecloud_logo_comparison.jpg","width":155,"height":40,"caption":"FileCloud"},"image":{"@id":"https:\/\/www.filecloud.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/tonidopage","https:\/\/twitter.com\/getfilecloud","https:\/\/www.linkedin.com\/company\/codelathe","https:\/\/www.pinterest.com\/filecloud\/filecloud\/","https:\/\/www.youtube.com\/channel\/UCbU5gTFdNCPESA5aGipFW6g"]}]}},"_links":{"self":[{"href":"https:\/\/www.filecloud.com\/blog\/wp-json\/wp\/v2\/pages\/3659"}],"collection":[{"href":"https:\/\/www.filecloud.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.filecloud.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.filecloud.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.filecloud.com\/blog\/wp-json\/wp\/v2\/comments?post=3659"}],"version-history":[{"count":11,"href":"https:\/\/www.filecloud.com\/blog\/wp-json\/wp\/v2\/pages\/3659\/revisions"}],"predecessor-version":[{"id":33059,"href":"https:\/\/www.filecloud.com\/blog\/wp-json\/wp\/v2\/pages\/3659\/revisions\/33059"}],"wp:attachment":[{"href":"https:\/\/www.filecloud.com\/blog\/wp-json\/wp\/v2\/media?parent=3659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}