{"id":2510,"date":"2016-07-22T07:56:12","date_gmt":"2016-07-21T19:56:12","guid":{"rendered":"http:\/\/www.zoyinc.com\/?p=2510"},"modified":"2023-05-28T15:41:25","modified_gmt":"2023-05-28T03:41:25","slug":"enabling-ssh-access-to-debian-live-usb","status":"publish","type":"post","link":"http:\/\/www.zoyinc.com\/?p=2510","title":{"rendered":"Enabling SSH access to Debian live USB"},"content":{"rendered":"\n<p>This is just a short post describing how you can USB boot from a Debian Live USB key and from this enable SSH access to the box. I do this often and it can be quite handy.<\/p>\n\n\n\n<p>First create the USB key using the instructions in the post <a  href=\"http:\/\/www.zoyinc.com\/?p=2353\">Create a Debian Live USB flash drive.<\/a><\/p>\n\n\n\n<p>Then<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>1.<\/td><td>Boot from the USB and select the \u201cLive (586)\u201d option.<\/td><\/tr><tr><td>2.<\/td><td>Should you get timed out the password for the user \u201cuser\u201d is \u201clive\u201d.<\/td><\/tr><tr><td>3.<\/td><td>For Debian live you are not told the root password and you have to &#8216;sudo&#8217; to do anything administrative.\n<p>&nbsp;<\/p>\n<p>We really need to do everything from now on as root so run:<\/p>\n<pre class=\"crayon:false;\">sudo passwd root<\/pre>\n<p>to change the root password and then<\/p>\n<pre class=\"crayon:false;\">sudo su - root<\/pre>\n<\/td><\/tr><tr><td>4.<\/td><td>\n<p>Install the ssh server<\/p>\n<pre>sudo apt install openssh-server<\/pre>\n<p>Next we need to edit the \u201c\/etc\/ssh\/sshd_config\u201d file to allow remote access. In this file change:<\/p>\n<pre class=\"crayon:false;\">PermitRootLogin yes\nPasswordAuthentication yes<\/pre>\n<\/td><\/tr><tr><td>5<\/td><td>You need to restart the ssh daemon so run:\n<p>&nbsp;<\/p>\n<pre class=\"crayon:false;\">\/etc\/init.d\/ssh restart<\/pre>\n<\/td><\/tr><tr><td>6.<\/td><td> <p>You should work out the IP of the system by running:<\/p> <pre class=\"crayon:false;\">ip address<\/pre><p>Obviously the IP is the one listed:<\/p> <pre class=\"crayon:false;\">eth0\u00a0\u00a0\u00a0\u00a0\u00a0 Link encap:Ethernet\u00a0 HWaddr 00:1b:78:50:5d:4a \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 inet addr:<span style=\"background-color: #ffff00;\">192.168.202.192<\/span>\u00a0 Bcast:192.168.202.255\u00a0 Mask:255.255.255.0<\/pre> <p>You may find, like I did on one occasion that it only showed an IPv6 address for eth0, just restart the Debian live and hopefully it will be right the next time. For me I had left it idle for several days, maybe that was the issue.<\/p> <\/td><\/tr><tr><td>7.<\/td><td>At this point you should be able to connect to the system remotely, using Putty etc., but connect via the IP found from running ifconfig, in our case the IP was 192.168.202.237.<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>This is just a short post describing how you can USB boot from a Debian Live USB key and from this enable SSH access to the box. I do this often and it can be quite handy. First create the USB key using the instructions in the post Create a Debian Live USB flash drive. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2532,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[312,1],"tags":[318,340,210,341,314],"class_list":["post-2510","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian","category-uncategorized","tag-debian","tag-debian-live","tag-shell","tag-ssh","tag-usb"],"_links":{"self":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/2510","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2510"}],"version-history":[{"count":3,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/2510\/revisions"}],"predecessor-version":[{"id":5260,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/posts\/2510\/revisions\/5260"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=\/wp\/v2\/media\/2532"}],"wp:attachment":[{"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2510"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zoyinc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}