<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lyle Backenroth &#187; SSH</title>
	<atom:link href="http://www.lylebackenroth.com/blog/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lylebackenroth.com/blog</link>
	<description></description>
	<lastBuildDate>Thu, 10 Nov 2011 19:34:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Helpful SSH commands: Part 1</title>
		<link>http://www.lylebackenroth.com/blog/2010/12/20/helpful-ssh-commands_part1/</link>
		<comments>http://www.lylebackenroth.com/blog/2010/12/20/helpful-ssh-commands_part1/#comments</comments>
		<pubDate>Mon, 20 Dec 2010 20:06:56 +0000</pubDate>
		<dc:creator>lyle</dc:creator>
				<category><![CDATA[Blogroll]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.lylebackenroth.com/blog/?p=665</guid>
		<description><![CDATA[I use many of these commands quite often. They&#8217;re immensely helpful when one wants to do a lot of remote work on a computer, or simply access resources on a remote machine (Linux or otherwise). (FYI: OpenSSH may be installed on Windows machines if anyone does not have a home Linux box to receive SSH sessions, and may [...]]]></description>
			<content:encoded><![CDATA[<p>I use many of these commands quite often. They&#8217;re immensely helpful when one wants to do a lot of remote work on a computer, or simply access resources on a remote machine (Linux or otherwise). (FYI: <a href="http://sshwindows.sourceforge.net/" target="_blank">OpenSSH</a> may be installed on Windows machines if anyone does not have a home Linux box to receive SSH sessions, and may use <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank">PUTTY</a> to SSH from a Windows machine).</p>
<p>1. Using a <a href="http://www.amazon.com/Hauppauge-1192-HVR-1950-External-Recorder/dp/B00198MYB0" target="_blank">Hauppauge HVR-1950</a> on one of my home machines, I often watch TV on my computer. If I ever want to watch remotely, I set VLC to stream the feed from the capture device (addressing it as a PVR on /dev/video0) using an OGG codec to the local IP address on a specific port number, then SSH to the same box from the outside with the following command:</p>
<pre>ssh MyPublicIPAddress -p 12345 -L 6500:192.168.0.10:2503 -o TCPKeepAlive=yes -o ServerAliveInterval=30</pre>
<p>This command will SSH to my home public IP on my alternate SSH port and listen locally (client side) on port 6500 and forward the traffic requests (encrypted via the SSH tunnel) to my local server on 192.168.0.10 on port 2503 (the port I configured VLC to stream on from the server with the Hauppauge device). When I launch VLC on my client and engage a network connection on 127.0.0.1 on port 6500 (using VLC menu option ctrl-N) &#8212; poof &#8212; TV appears on my remote PC.</p>
<p>2. Local port redirects: Using this example:</p>
<pre>ssh MyPublicIPAddress -p 12345 -L 7000:192.168.0.12:5900 -D 15000 -L 6000:192.168.0.25:3389 -o TCPKeepAlive=yes -o ServerAliveInterval=30</pre>
<p>This is really an extension of concepts explained in item #1. With SSH you can forward any local port to any remote port on the other side, and funnel encrypted traffic to any computer running any OS on the SSH server side. So to VNC to a home machine from a remote location, simply SSH to your home machine (may require port forwarding and/or port knocking) and divert local port traffic to a remote server of your choice.</p>
<p>Note the -D 15000, allows for a SOCKS PROXY, which routes any application&#8217;s traffic using SOCKS out of your SSH&#8217;ed connection. For example, you can engage a SOCKS proxy on Firefox and then check your public IP address (by going to whatismyip.com) and you&#8217;ll see that while your real public IP may be one address, all your browser traffic is routed through your home connection.</p>
<p>There&#8217;s a lot to say on this subject (for example DNS translations are not routed by default through the tunnel) and other nuances. Google &#8220;SOCKS PROXY SSH DNS&#8221; for more info. <a href="http://ubuntu-tutorials.com/2008/06/18/tunnel-web-and-dns-traffic-over-ssh/" target="_blank">This link may offer some further assistance</a>.</p>
<p>There are other complications, in that it&#8217;s not easy to route operating system DNS requests (outside of the Firefox browser) through SSH, primarily because DNS runs on UDP port 53. I do not believe SSH will natively handle UDP port rerouting, though I&#8217;ve seen <a href="http://www.debianadmin.com/howto-perform-udp-tunneling-through-ssh-connection.html" target="_blank">some creative solutions with netcat and mkfifo</a>.</p>
<p>Also I have read (in the man pages) that Chrome supports SOCKS, I have read running Chrome with <strong>&#8211;proxy-server=&lt;host&gt;:&lt;port&gt;</strong>. For example when running the browser, <strong>google-chrome &#8211;proxy-server=&#8221;socks://foobar:1080&#8243;</strong>(with quotation marks), assuming that foobar is 127.0.0.1 (assuming you used a -D option for dynamic port forwarding) and port 1080 was the destination port at the end of your -L port:host:port command switch. Check the google-chrome man page for more details.</p>
<p>In the same example used above (copied below for convenience), once I connect to my home SSH box via MyPublicIPAddress, I simply have to engage a VNC viewing session to my own client (localhost) on port 7000, and it&#8217;ll route to the IP address of my choice inside my home network, in this case 192.168.0.12. VNC defaults to answering on port 5900. Multiple -L&#8217;s may be added to route many protocols (RDP, VNC, VLC, NFS, Web (80), even e-mail ports) to various machines on the local network.</p>
<p>In the example below I&#8217;ve added a second -L option routing traffic from my local client on local port 6000 to another machine (192.168.0.25) in my home network on port 3389 (the Windows RDP port). In that scenario, running (in Windows) <strong>mstsc /v:localhost:6000</strong> would allow me to RDP to my home machine, 192.168.0.25. In Linux, I would run <strong>rdesktop localhost:6000</strong>.</p>
<pre>ssh MyPublicIPAddress -p 12345 -L 7000:192.168.0.12:5900 -D 15000 -L 6000:192.168.0.25:3389 -o TCPKeepAlive=yes -o ServerAliveInterval=30</pre>
<p>2a. An extension of the port redirect function of SSH in #2, I&#8217;ve written a post on dynamically adding port redirects without having to kill an SSH session to add the new redirects, instead add them on the fly: <a href="http://www.lylebackenroth.com/blog/2009/01/26/ssh-on-the-fly-port-forwarding/#more-302" target="_blank">Click here for the post</a>.</p>
<p>3. SSHFS. Not much to say about it here, simply check <a href="http://www.lylebackenroth.com/blog/sshfs/" target="_blank">my full writeup</a> on the subject.</p>
<p>There are many others that you can find on <a href="http://www.commandlinefu.com/commands/matching/ssh/c3No/sort-by-votes" target="_blank">commandlinefu.com</a>, including one using <a href="http://en.wikipedia.org/wiki/Port_knocking" target="_blank">port knocking</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lylebackenroth.com/blog/2010/12/20/helpful-ssh-commands_part1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSHsplit &#8211; A utility to multiplex ssh dynamic tunnels</title>
		<link>http://www.lylebackenroth.com/blog/2010/03/09/sshsplit-a-utility-to-multiplex-ssh-dynamic-tunnels/</link>
		<comments>http://www.lylebackenroth.com/blog/2010/03/09/sshsplit-a-utility-to-multiplex-ssh-dynamic-tunnels/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 04:24:39 +0000</pubDate>
		<dc:creator>lyle</dc:creator>
				<category><![CDATA[Blogroll]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.lylebackenroth.com/blog/?p=483</guid>
		<description><![CDATA[Source: The Original Developer. (Launchpad link): A dynamic tunnel SSH multiplexer. When heavily using a Dynamic SSH tunnel, this application will open concurrent SSH tunnels to multiplex the load. This is useful when using torrent connections locally, or when using your computer to share internet access via the dynamic proxy. To install on Ubuntu Karmic: [...]]]></description>
			<content:encoded><![CDATA[<p>Source: <a href="http://www.ubuntugeek.com/sshsplit-a-utility-to-multiplex-ssh-dynamic-tunnels.html" target="_blank">The Original Developer</a>.</p>
<p>(<a href="https://launchpad.net/sshsplit" target="_blank">Launchpad link</a>):</p>
<p>A dynamic tunnel SSH multiplexer. When heavily using a Dynamic SSH tunnel, this application will open concurrent SSH tunnels to multiplex the load. This is useful when using torrent connections locally, or when using your computer to share internet access via the dynamic proxy.</p>
<p>To install on Ubuntu Karmic:</p>
<p><code>sudo add-apt-repository ppa:martineve/ppa</code></p>
<p><code>sudo apt-get update</p>
<p></code></p>
<p><code>sudo apt-get install sshsplit</code></p>
<p>If no arguments are passed, you can run sshsplit from command line and it will bring up a convenient GUI for on the fly configuration.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lylebackenroth.com/blog/2010/03/09/sshsplit-a-utility-to-multiplex-ssh-dynamic-tunnels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH: On the fly port forwarding.</title>
		<link>http://www.lylebackenroth.com/blog/2009/01/26/ssh-on-the-fly-port-forwarding/</link>
		<comments>http://www.lylebackenroth.com/blog/2009/01/26/ssh-on-the-fly-port-forwarding/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 06:33:14 +0000</pubDate>
		<dc:creator>lyle</dc:creator>
				<category><![CDATA[Blogroll]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.lylebackenroth.com/blog/?p=302</guid>
		<description><![CDATA[Once inside an SSH session, you may realize that you need to reach another box via the local port redirect (-L 1234:192.168.0.5:23 for example). Most people think you need to kill your SSH session to add a new -L option, then reinitiate the SSH session; this is NOT true. You can open an internal SSH [...]]]></description>
			<content:encoded><![CDATA[<p>Once inside an SSH session, you may realize that you need to reach another box via the local port redirect (-L 1234:192.168.0.5:23 for example).</p>
<p>Most people think you need to kill your SSH session to add a new -L option, then reinitiate the SSH session; this is NOT true.</p>
<p>You can open an internal SSH shell within an SSH session to add new redirects!</p>
<p>From within an SSH session, simply type:</p>
<p><strong>~# </strong>then hit <strong>&lt;enter&gt;</strong></p>
<p><strong>~C </strong>then hit <strong>&lt;enter&gt;</strong></p>
<p>Then type: <strong>help </strong>and <strong>&lt;enter&gt;</strong></p>
<p>You&#8217;ll see a listing of available commands. To add a new local redirect, just type</p>
<p><strong>-L 4567:192.168.0.12:5900</strong>, then hit <strong>&lt;enter&gt;</strong></p>
<p>&#8230;and voilà, you&#8217;ve added a new local redirect. Just hit <strong>&lt;enter&gt;</strong> once, and you&#8217;ll be dropped back into command line.</p>
<p>There are other escape-commands. Just type <strong>~?</strong> from within an SSH session for more escape-commands.</p>
<p>FYI: This also works for <strong>remote redirects</strong>, as well.</p>
<p><a href="http://www.google.com/search?q=ssh+add+local+forwarding+on+the+fly&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t" target="_blank">Here&#8217;s a Google search link offering more info:</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lylebackenroth.com/blog/2009/01/26/ssh-on-the-fly-port-forwarding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSHMenu &#8211; Like Putty, but for Gnome!</title>
		<link>http://www.lylebackenroth.com/blog/2008/06/18/sshmenu-like-putty-but-for-gnome/</link>
		<comments>http://www.lylebackenroth.com/blog/2008/06/18/sshmenu-like-putty-but-for-gnome/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 14:31:02 +0000</pubDate>
		<dc:creator>lyle</dc:creator>
				<category><![CDATA[Blogroll]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.lylebackenroth.com/blog/?p=119</guid>
		<description><![CDATA[I generally prefer SSH&#8217;ing to hosts from the CLI (Command Line Interface) though there are times when a GUI is preferable, especially when there&#8217;s a variety of settings specific to each session that might be desired. SSHMenu is much like Putty, in that you can set up individual address book style destinations to SSH into, [...]]]></description>
			<content:encoded><![CDATA[<p>I generally prefer SSH&#8217;ing to hosts from the CLI (Command Line Interface) though there are times when a GUI is preferable, especially when there&#8217;s a variety of settings specific to each session that might be desired.</p>
<p>SSHMenu is much like Putty, in that you can set up individual address book style destinations to SSH into, and save settings for each. While scripting them from the CLI and applying a chmod +x, I can see the benefit of using a centralized GUI.</p>
<p>From the site:</p>
<blockquote><p><em>Each menu option will open an SSH session in a new terminal window.       You can organise groups of hosts with separator bars or sub-menus.  You       can even open all the connections on a submenu (in separate windows or       tabs) with one click.</em></p>
<p><em>Here&#8217;s a <strong>killer feature</strong>: imagine if every time you connected to       a production server the terminal window had a red-tinted background, to       remind you to tread carefully.  Using terminal profiles, SSHMenu allows       you to specify colours, fonts, transparency and a variety of other       settings on a per-connection basis.  You can even set window size and       position.</em></p></blockquote>
<p>It also leverages Gnome terminal profiles, so you can set up unique profiles to specify transparency, text color and background to remind you of which SSH Host you&#8217;re in. It&#8217;s written in Ruby, so once you add the source to your /etc/apt/sources.list you&#8217;ll need to sudo apt-get update, and import their GPG keys, and re-update again, then install.</p>
<p>Sources: <a href="http://www.linux.com/feature/138334" target="_blank">Linux.com</a>, <a href="http://sshmenu.sourceforge.net/" target="_blank">SSHMenu</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lylebackenroth.com/blog/2008/06/18/sshmenu-like-putty-but-for-gnome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Object Caching 218/424 objects using disk: basic

Served from: lylebackenroth.com @ 2012-02-05 11:13:19 -->
