{"id":380,"date":"2009-09-13T10:59:06","date_gmt":"2009-09-13T10:59:06","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/index.php\/?p=380"},"modified":"2009-09-13T10:59:06","modified_gmt":"2009-09-13T10:59:06","slug":"anonymous-ssh-sessions-with-tor","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/","title":{"rendered":"Anonymous SSH Sessions With TOR"},"content":{"rendered":"<p>OpenSSH is a great means to protect your connection from being sniffed by others. However, this isn&#8217;t always enough. Simply proving that you connected to a server is enough to get incriminated. Unfortunately, SSH doesn&#8217;t provide a native way to obfuscate to whom it connects. Instead, a proxy server can be set up. And this is where TOR comes to play. This howto covers installing TOR on a Debian based system and setting up SSH to use TOR.<\/p>\n<p>Installing TOR<\/p>\n<p>First you should to add the TOR repository to your system. It&#8217;s only necessary if there&#8217;s no package in the default repositories.<\/p>\n<p>Add the following line to your \/etc\/apt\/sources.list file. You have to replace lenny with your distribution.<\/p>\n<p>deb http:\/\/mirror.noreply.org\/pub\/tor lenny main<\/p>\n<p>To use this repository without problems, you have to add the PGP key to your system.<\/p>\n<p>apt-key adv &#8211;recv-keys &#8211;keyserver subkeys.pgp.net 0x94C09C7F<\/p>\n<p>Update your repositories and install TOR.<\/p>\n<p>apt-get update &#038;&#038; apt-get install -y tor<\/p>\n<p>If you want to use TOR with OpenSSH, you have to install another program called connect-proxy.<\/p>\n<p>apt-get install -y connect-proxy<\/p>\n<p>Setup OpenSSH to use TOR for all connections<\/p>\n<p>However, this is not recommended, but here is how it works.<\/p>\n<p>Add the following block to the top of your ~\/.ssh\/config file.<\/p>\n<p>Host *<br \/>\nCheckHostIP no<br \/>\nCompression yes<br \/>\nProtocol 2<br \/>\nProxyCommand connect -4 -S localhost:9050 $(tor-resolve %h localhost:9050) %p<\/p>\n<p>The command line syntax won&#8217;t change at all.<\/p>\n<p>Set up OpenSSH to use TOR for a specific connection<\/p>\n<p>I recommend using TOR only for a specific connection. All other connections won&#8217;t be affected.<\/p>\n<p>Add this block to your ~\/.ssh\/config. You have to replace mydomain with the host domain name or IP address and myaccount with your user name.<\/p>\n<p>Host mydomain<br \/>\nHostName mydomain.com<br \/>\nUser myaccount<br \/>\nCheckHostIP no<br \/>\nCompression yes<br \/>\nProtocol 2<br \/>\nProxyCommand connect -4 -S localhost:9050 $(tor-resolve %h localhost:9050) %p<\/p>\n<p>Set up OpenSSH to use TOR for a bunch of connections<\/p>\n<p>Instead of setting up TOR for every single connections, you can do this for a bunch of connections at once. Following example shows how it works.<\/p>\n<p>Host anon_*<br \/>\nCheckHostIP no<br \/>\nCompression yes<br \/>\nProtocol 2<br \/>\nProxyCommand connect -4 -S localhost:9050 $(tor-resolve %h localhost:9050) %p<br \/>\nHost anon_mydomain<br \/>\nHostName mydomain.com<br \/>\nUser myaccount<br \/>\nHost anon_mydomain2<br \/>\nHostName mydomain2.com<br \/>\nUser myaccount<br \/>\nPort 980<\/p>\n<p>This way you know exactly if you&#8217;re using TOR or not.<\/p>\n<p>Conclusion<\/p>\n<p>It is very simple to anonymize your SSH sessions if you know what you&#8217;re doing. I&#8217;ve written this tutorial for legal purposes only. Using this is your own risk.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OpenSSH is a great means to protect your connection from being sniffed by others. However, this isn&#8217;t always enough. Simply proving that you connected to a server is enough to get incriminated. Unfortunately, SSH doesn&#8217;t provide a native way to obfuscate to whom it connects. Instead, a proxy server can be set up. And this&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-380","post","type-post","status-publish","format-standard","hentry","category-info"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Anonymous SSH Sessions With TOR - Linux Shtuff<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Anonymous SSH Sessions With TOR - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"OpenSSH is a great means to protect your connection from being sniffed by others. However, this isn&#8217;t always enough. Simply proving that you connected to a server is enough to get incriminated. Unfortunately, SSH doesn&#8217;t provide a native way to obfuscate to whom it connects. Instead, a proxy server can be set up. And this... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2009-09-13T10:59:06+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/anonymous-ssh-sessions-with-tor\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/anonymous-ssh-sessions-with-tor\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Anonymous SSH Sessions With TOR\",\"datePublished\":\"2009-09-13T10:59:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/anonymous-ssh-sessions-with-tor\\\/\"},\"wordCount\":440,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"General Info\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/anonymous-ssh-sessions-with-tor\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/anonymous-ssh-sessions-with-tor\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/anonymous-ssh-sessions-with-tor\\\/\",\"name\":\"Anonymous SSH Sessions With TOR - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2009-09-13T10:59:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/anonymous-ssh-sessions-with-tor\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/anonymous-ssh-sessions-with-tor\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/anonymous-ssh-sessions-with-tor\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Anonymous SSH Sessions With TOR\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Anonymous SSH Sessions With TOR - Linux Shtuff","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:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/","og_locale":"en_US","og_type":"article","og_title":"Anonymous SSH Sessions With TOR - Linux Shtuff","og_description":"OpenSSH is a great means to protect your connection from being sniffed by others. However, this isn&#8217;t always enough. Simply proving that you connected to a server is enough to get incriminated. Unfortunately, SSH doesn&#8217;t provide a native way to obfuscate to whom it connects. Instead, a proxy server can be set up. And this... Read More","og_url":"https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2009-09-13T10:59:06+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Anonymous SSH Sessions With TOR","datePublished":"2009-09-13T10:59:06+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/"},"wordCount":440,"commentCount":0,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["General Info"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/","url":"https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/","name":"Anonymous SSH Sessions With TOR - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2009-09-13T10:59:06+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/anonymous-ssh-sessions-with-tor\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Anonymous SSH Sessions With TOR"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=380"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/380\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}