{"id":117,"date":"2019-08-02T12:49:06","date_gmt":"2019-08-02T11:49:06","guid":{"rendered":"http:\/\/xv6.de\/?page_id=117"},"modified":"2022-08-15T10:02:08","modified_gmt":"2022-08-15T09:02:08","slug":"bash-on-windows-ubuntu-18-04-lts-sshd","status":"publish","type":"page","link":"https:\/\/xv6.de\/?page_id=117","title":{"rendered":"Bash on Windows &#8211; Ubuntu 18.04 LTS &#8211; SSHd"},"content":{"rendered":"\n<p>After installing Bash on Windows and Ubuntu 18.04 LTS is SSHd not operational as the host keys are not created. There are three keys which are missing. While starting or stopping the service a message about each missing host key is shown.<\/p>\n\n\n\n<p>To generate the missing keys run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ ssh-keygen -f \/etc\/ssh\/ssh_host_ed25519_key -N '' -t ed25519\r\n$ ssh-keygen -f \/etc\/ssh\/ssh_host_rsa_key -N '' -t rsa\r\n$ ssh-keygen -f \/etc\/ssh\/ssh_host_ecdsa_key -N '' -t ecdsa -b 521<\/code><\/pre>\n\n\n\n<p>Login with a password into a SSH session fails as password authentication is disabled. You need to set PasswordAuthentication from no to yes in \/etc\/ssh\/sshd_conf. This can be archived with sed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sed -i 's\/PasswordAuthentication no\/PasswordAuthentication yes\/g' \/etc\/ssh\/sshd_config<\/code><\/pre>\n\n\n\n<p>Aa last action restart sshd:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ \/etc\/init.d\/ssh restart<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>After installing Bash on Windows and Ubuntu 18.04 LTS is SSHd not operational as the host keys are not created. There are three keys which are missing. While starting or stopping the service a message about each missing host key is shown. To generate the missing keys run the following commands: Login with a password &hellip; <a href=\"https:\/\/xv6.de\/?page_id=117\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Bash on Windows &#8211; Ubuntu 18.04 LTS &#8211; SSHd<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-117","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/xv6.de\/index.php?rest_route=\/wp\/v2\/pages\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xv6.de\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/xv6.de\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/xv6.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xv6.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=117"}],"version-history":[{"count":5,"href":"https:\/\/xv6.de\/index.php?rest_route=\/wp\/v2\/pages\/117\/revisions"}],"predecessor-version":[{"id":250,"href":"https:\/\/xv6.de\/index.php?rest_route=\/wp\/v2\/pages\/117\/revisions\/250"}],"wp:attachment":[{"href":"https:\/\/xv6.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}