<?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>experimental &#187; SSH</title>
	<atom:link href="http://www.tajidyakub.com/tag/ssh/feed" rel="self" type="application/rss+xml" />
	<link>http://www.tajidyakub.com</link>
	<description>Experience the Experiment</description>
	<lastBuildDate>Sat, 10 Oct 2009 19:32:38 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SSH Connection Shortcut</title>
		<link>http://www.tajidyakub.com/nix-basics/ssh-connection-shortcut-2009-09-28.html</link>
		<comments>http://www.tajidyakub.com/nix-basics/ssh-connection-shortcut-2009-09-28.html#comments</comments>
		<pubDate>Sun, 27 Sep 2009 19:43:56 +0000</pubDate>
		<dc:creator>Tajid Yakub</dc:creator>
				<category><![CDATA[Nix Basics]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.tajidyakub.com/?p=30</guid>
		<description><![CDATA[
Occasionally I have to leave my XP workstation and use Linux or Mac Desktop, both don&#8217;t have putty like in XP, most probably because they have built in SSH client installed :).
But I need somehow make it easier to connect from those desktop to servers with Key Authentication, instead of running this from the terminal;
ssh [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.tajidyakub.com/wp-content/uploads/2009/09/openssh-mac.jpg"><img class="size-full wp-image-31 alignnone" title="openssh-mac" src="http://www.tajidyakub.com/wp-content/uploads/2009/09/openssh-mac.jpg" alt="openssh-mac" width="540" height="80" /></a></p>
<p>Occasionally I have to leave my XP workstation and use Linux or Mac Desktop, both don&#8217;t have putty like in XP, most probably because they have built in SSH client installed :).</p>
<p><span id="more-30"></span>But I need somehow make it easier to connect from those desktop to servers with Key Authentication, instead of running this from the terminal;</p>
<pre class="brush: bash">ssh -p xxxx -l root 117.103.xx.xx -i ~/ssh-keys/me\@tajidyakub.net.ppk</pre>
<p>While in Putty, I could simply use Connection Sessions preferences load a particular private key for specific connection and utilize Putty PageAnt to Authorize the pass phrase automatically. It is as simple as it gets since I only have to double click, and logged in instantly.</p>
<p>But turns out I can do the task event simpler in Linux or Mac. I create a folder in My Desktop to store my connection;</p>
<pre class="brush: bash">mkdir ~/Desktop/SSH/</pre>
<p>And create a file with .sh extension. doesn&#8217;t have to be .sh extension, just wanted to name it that way :).</p>
<pre class="brush: bash">cd ~/Desktop/SSH/
vi myserver.sh</pre>
<p>And insert the content;</p>
<pre>ssh -p xxxx -l root 117.103.xx.xx -i ~/path/to/yourprivatekey.ppk</pre>
<p>yourprivatekey.ppk is a private key, in my case, I exported it using Putty Gen from my XP machine so it is going to look like this;</p>
<pre>tjdykb$ cat me\@tajidyakub.net.ppk
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,...
nYMNS/d7RJSx1qswncyw2cd7NiCXfwZkQ6m+OMzcCtXMj8vCBDhTSyhkwxQ0lByY
tgp0zA3HkKKYI5ACl5+Q7MEZwwi+Dpz8wHY2E5adjqAbWm5M/Li9e1EBJgWM15EQ
.......
8OfpeNjO85IGBPpNYct56Z1VFCpadkph0WPE1vdrLmjhQOBu2ftamY8hJ9kFaNRH
At/j4dC4HI3kwmuM7onZIb2vZIfxmW2sUceY2NhBLEbT+kOd3Tu2/EYkKNlfmW43
3gfOqCOzUqnGON7hopzQbMK/PfvOvT+bPIE14RZG8IFhiNUu10yrd+FkF6HFlNIi
ljJTuFKDgCm/3OezeV/bzWcVMkBqoaMwxN/hI7OHe1HYb0QpZbIU/ePwt6cVGYSh
zfkIFTJl61WWTvB81oRhS5JZ6nf3OUkuFxCjJ4PseFw=
-----END RSA PRIVATE KEY-----</pre>
<p>And to load the connection from a terminal, simply execute the file (don&#8217;t forget to chmod so it becomes executable &#8211; like 755);</p>
<pre class="brush: bash">./yourserver.sh</pre>
<p>In a desktop environment, a pop up will appear asking for the pass phrases, you could add the pass phrase to your key chain or saved password avoid this the next time you load the connection.</p>
<p><a href="http://www.tajidyakub.com/wp-content/uploads/2009/09/keychain.jpg"><img class="alignnone size-full wp-image-33" title="keychain" src="http://www.tajidyakub.com/wp-content/uploads/2009/09/keychain.jpg" alt="keychain" width="540" height="260" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tajidyakub.com/nix-basics/ssh-connection-shortcut-2009-09-28.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
