{"id":623,"date":"2012-07-10T12:44:59","date_gmt":"2012-07-10T04:44:59","guid":{"rendered":"http:\/\/rmohan.com\/?p=623"},"modified":"2012-07-10T12:44:59","modified_gmt":"2012-07-10T04:44:59","slug":"delay-in-ssh-login-prompt","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=623","title":{"rendered":"Delay in SSH Login Prompt"},"content":{"rendered":"<p><strong>Delay in SSH Login Prompt<\/strong><\/p>\n<div><span style=\"font-family: verdana,sans-serif;\">You may came across this situation. At the time of logging in the shell prompt using SSH,\u00a0<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><br \/>\n<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &#8211; Connection will be taking a fraction of second<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &#8211;\u00a0After\/While entering the Password its taking more time to provide the shell prompt.<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0<\/span><\/div>\n<div><strong><span style=\"text-decoration: underline;\">To fix this issue:<\/span><\/strong><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><br \/>\n<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">This is related to DNS. We have to change dns related entries in ssh config file to reduce this delay.<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><br \/>\n<\/span><\/div>\n<div><strong><span style=\"text-decoration: underline;\">Note :<\/span><\/strong><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">\u00a0\u00a0 \u00a0 Be careful when doing this on production servers.\u00a0<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">\u00a0\u00a0 \u00a0 This activity may disconnect all the users from the system who are logged in to that machine using SSH.\u00a0<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><br \/>\n<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">By default UseDNS option in this file is disable. We have to uncomment this option and then edit this entry to no. As below..\u00a0<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><br \/>\n<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><em><span style=\"color: #660000;\"># vi \/etc\/ssh\/sshd_config\u00a0<\/span><\/em><\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><br \/>\n<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">Just search for UseDNS..\u00a0<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><br \/>\n<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 <\/span><em><span style=\"color: #660000;\"><span style=\"font-family: verdana,sans-serif;\">#UseDNS yes \u00a0<\/span><\/span><\/em><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><br \/>\n<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">Change that to, (Simply Uncomment it)<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><br \/>\n<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<\/span><em><span style=\"color: #660000;\"><span style=\"font-family: verdana,sans-serif;\">UseDNS no<\/span><\/span><\/em><span style=\"font-family: verdana,sans-serif;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><br \/>\n<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">save and exit the file and then just reload ssh service to take effect what ever changes we did..\u00a0<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><br \/>\n<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><span style=\"color: #660000;\"><em># service sshd reload<\/em><\/span><\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">\u00a0\u00a0<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\">Now try to login and observe, delay will be reduced.<\/span><\/div>\n<div><span style=\"font-family: verdana,sans-serif;\"><br \/>\n<\/span><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Delay in SSH Login Prompt<\/p>\n<p> You may came across this situation. At the time of logging in the shell prompt using SSH, &#8211; Connection will be taking a fraction of second &#8211; After\/While entering the Password its taking more time to provide the shell prompt. To fix this issue: This is related to DNS. We [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/623"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=623"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/623\/revisions"}],"predecessor-version":[{"id":625,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/623\/revisions\/625"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}