{"id":9767,"date":"2024-03-25T11:41:36","date_gmt":"2024-03-25T11:41:36","guid":{"rendered":"https:\/\/www.bairesdev.com\/tools\/tessel\/?p=9767"},"modified":"2024-05-09T11:05:57","modified_gmt":"2024-05-09T11:05:57","slug":"accessing-root-on-tessel-2","status":"publish","type":"post","link":"https:\/\/www.bairesdev.com\/tools\/tessel\/docs\/accessing-root-on-tessel-2\/","title":{"rendered":"Accessing root on Tessel 2"},"content":{"rendered":"\n<p>If you wish to access root on Tessel 2 and explore its Linux filesystem, you have a few options.<\/p>\n\n\n\n<p>The simplest option is&nbsp;<code>t2 root<\/code>, which gives SSH access to a Tessel 2 you are authorized with.<\/p>\n\n\n\n<p>However, while you&#8217;re building tools for Tessel, you may need to access Tessel in ways not exposed by the\u00a0CLI. Here are two options:<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_66_1 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.bairesdev.com\/tools\/tessel\/docs\/accessing-root-on-tessel-2\/#SSH\" title=\"SSH\">SSH<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.bairesdev.com\/tools\/tessel\/docs\/accessing-root-on-tessel-2\/#Setup\" title=\"Setup\">Setup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.bairesdev.com\/tools\/tessel\/docs\/accessing-root-on-tessel-2\/#SSH_in\" title=\"SSH in\">SSH in<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.bairesdev.com\/tools\/tessel\/docs\/accessing-root-on-tessel-2\/#Getting_out\" title=\"Getting out\">Getting out<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.bairesdev.com\/tools\/tessel\/docs\/accessing-root-on-tessel-2\/#dterm\" title=\"dterm\">dterm<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.bairesdev.com\/tools\/tessel\/docs\/accessing-root-on-tessel-2\/#Setup-2\" title=\"Setup\">Setup<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.bairesdev.com\/tools\/tessel\/docs\/accessing-root-on-tessel-2\/#dterm_in\" title=\"dterm in\">dterm in<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.bairesdev.com\/tools\/tessel\/docs\/accessing-root-on-tessel-2\/#Getting_out-2\" title=\"Getting out\">Getting out<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\" id=\"ssh\"><span class=\"ez-toc-section\" id=\"SSH\"><\/span>SSH<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>If you can connect to your Tessel 2 over\u00a0LAN, SSH or\u00a0<code>t2 root<\/code>\u00a0are your best options.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"setup\"><span class=\"ez-toc-section\" id=\"Setup\"><\/span>Setup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Make sure your Tessel is\u00a0online. Check that it shows up on\u00a0LAN\u00a0with\u00a0<code>t2 list<\/code>.<\/p>\n\n\n\n<p>Run&nbsp;<code>t2 provision<\/code>&nbsp;to authorize your computer with your Tessel.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ssh-in\"><span class=\"ez-toc-section\" id=\"SSH_in\"><\/span>SSH in<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Use the command&nbsp;<code>ssh&nbsp;root@&lt;tesselname&gt;.local -i ~\/.tessel\/id_rsa<\/code>.<\/p>\n\n\n\n<p>The&nbsp;<code>-i<\/code>&nbsp;command lets you specify the filepath to the RSA keys written by&nbsp;<code>t2 provision<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"getting-out\"><span class=\"ez-toc-section\" id=\"Getting_out\"><\/span>Getting out<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>When you need out, type&nbsp;<code>exit<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"dterm\"><span class=\"ez-toc-section\" id=\"dterm\"><\/span>dterm<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Dterm lets you talk to Tessel over USB.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"setup\"><span class=\"ez-toc-section\" id=\"Setup-2\"><\/span>Setup<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"os-x\">OS X<\/h4>\n\n\n\n<p><em>Unfortunately, dterm isn&#8217;t supported on El Capitan and later. You may be able to use&nbsp;<a href=\"https:\/\/web.archive.org\/web\/20220812045531\/http:\/\/www.kinnetica.com\/2011\/05\/29\/using-screen-on-mac-os-x\/\" target=\"_blank\" rel=\"noreferrer noopener\">screen<\/a>&nbsp;instead.<\/em><\/p>\n\n\n\n<p>Install dterm with&nbsp;<code>brew install dterm<\/code>.<\/p>\n\n\n\n<p>Figure out what USB port your Tessel is plugged into by typing&nbsp;<code>ls \/dev\/tty.usbmodem<\/code>&nbsp;\u2013 see whether it auto-completes to e.g.&nbsp;<code>\/dev\/tty.usbmodem1412<\/code>&nbsp;or a different number.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"linux\">Linux<\/h4>\n\n\n\n<p>Download and build dterm, or use screen, which comes with most Linux distros.<\/p>\n\n\n\n<p>The path to the\u00a0serial\u00a0port is\u00a0<code>\/dev\/ttyACM0<\/code>\u00a0or \/<code>dev\/serial\/by-id\/usb-Technical_Machine_Tessel_2_&lt;serial number>-if01<\/code>\u00a0&#8211; find out by typing\u00a0<code>ls<\/code>\u00a0for those locations.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"windows\">Windows<\/h4>\n\n\n\n<p>Not sure, sorry&#8230; if you know how to access\u00a0serial\u00a0on Windows, please PR.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"dterm-in\"><span class=\"ez-toc-section\" id=\"dterm_in\"><\/span>dterm in<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Run&nbsp;<code>dterm \/dev\/tty.usbmodem1412<\/code>&nbsp;(or a different port number). You will have to press enter twice.<\/p>\n\n\n\n<p>If you&#8217;re going to do this a lot, it might be a good idea to alias the command:&nbsp;<code>alias v2=\"dterm \/dev\/tty.usbmodem1412\"<\/code>.<\/p>\n\n\n\n<p>If you need your ip address (for example if you&#8217;d like to ssh in next time), you can run&nbsp;<code>ifconfig<\/code>&nbsp;to get it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"getting-out\"><span class=\"ez-toc-section\" id=\"Getting_out-2\"><\/span>Getting out<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><code>CTRL+]<\/code><\/p>\n\n\n\n<p>then<\/p>\n\n\n\n<p><code>CTRL+C<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you wish to access root on Tessel 2 and explore its Linux filesystem, you have a few options. The simplest option is&nbsp;t2 root, which gives SSH access to a Tessel 2 you are authorized with. However, while you&#8217;re building tools for Tessel, you may need to access Tessel in ways not exposed by the\u00a0CLI. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58,4],"tags":[],"class_list":["post-9767","post","type-post","status-publish","format-standard","hentry","category-debugging","category-docs"],"_links":{"self":[{"href":"https:\/\/www.bairesdev.com\/tools\/tessel\/wp-json\/wp\/v2\/posts\/9767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bairesdev.com\/tools\/tessel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bairesdev.com\/tools\/tessel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bairesdev.com\/tools\/tessel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bairesdev.com\/tools\/tessel\/wp-json\/wp\/v2\/comments?post=9767"}],"version-history":[{"count":2,"href":"https:\/\/www.bairesdev.com\/tools\/tessel\/wp-json\/wp\/v2\/posts\/9767\/revisions"}],"predecessor-version":[{"id":10099,"href":"https:\/\/www.bairesdev.com\/tools\/tessel\/wp-json\/wp\/v2\/posts\/9767\/revisions\/10099"}],"wp:attachment":[{"href":"https:\/\/www.bairesdev.com\/tools\/tessel\/wp-json\/wp\/v2\/media?parent=9767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bairesdev.com\/tools\/tessel\/wp-json\/wp\/v2\/categories?post=9767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bairesdev.com\/tools\/tessel\/wp-json\/wp\/v2\/tags?post=9767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}