<?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>Sean&#039;s Blog &#187; openssl</title>
	<atom:link href="http://seanbehan.com/tag/openssl/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanbehan.com</link>
	<description>Web Programming, Ruby on Rails, Wordpress, PHP from Burlington, Vermont</description>
	<lastBuildDate>Wed, 18 Jan 2012 21:44:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adding Public/Private Key Pairs on Mac OS X and Ubuntu for Passwordless Remote SSH Sessions</title>
		<link>http://seanbehan.com/linux/adding-publicprivate-key-pairs-on-mac-os-x-and-ubuntu-for-passwordless-remote-ssh-sessions/</link>
		<comments>http://seanbehan.com/linux/adding-publicprivate-key-pairs-on-mac-os-x-and-ubuntu-for-passwordless-remote-ssh-sessions/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 23:09:42 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=872</guid>
		<description><![CDATA[On your local machine cd into the .ssh directory in your home &#8220;~/&#8221; directory. If it doesn&#8217;t exist you can create it with &#8220;mkdir ~/.ssh&#8221;. Next generate your public/private keys and copy the public key to the remote server. cd ~/.ssh ssh-keygen -t rsa -b 4096 # will take a couple seconds but when finished [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Flinux%2Fadding-publicprivate-key-pairs-on-mac-os-x-and-ubuntu-for-passwordless-remote-ssh-sessions%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Adding Public/Private Key Pairs on Mac OS X and Ubuntu for Passwordless Remote SSH Sessions" data-url="http://seanbehan.com/linux/adding-publicprivate-key-pairs-on-mac-os-x-and-ubuntu-for-passwordless-remote-ssh-sessions/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>On your local machine cd into the .ssh directory in your home &#8220;~/&#8221; directory. If it doesn&#8217;t exist you can create it with &#8220;mkdir ~/.ssh&#8221;. Next generate your public/private keys and copy the public key to the remote server.</p>
<pre class="wp-code-highlight prettyprint">
cd ~/.ssh
ssh-keygen -t rsa -b 4096
# will take a couple seconds but when finished
# specify a full path (if there is already an existing key) or hit enter to install to the default location ~/.ssh
# when it prompts for a passphrase just hit enter
# and enter again when it asks to confirm the passphrase
# then we copy the public key the remote server (this assumes you don't already have an authorized_keys file)
# copy and paste the contents of the id_rsa.pub file into the authorized_keys file otherwise
scp id_rsa.pub user@yourdomain.com:.ssh/authorized_keys
</pre>
<p>You&#8217;ll need to edit your ssh config file and restart the process to allow for public/private key authentication.</p>
<pre class="wp-code-highlight prettyprint">
vim /etc/ssh/ssh_config
# add or uncomment these two lines
RSAAuthentication yes
PubKeyAuthentication yes
# ... and restart
/etc/init.d/ssh restart
</pre>
<h1>Troubleshooting</h1>
<p>A couple of things to keep in mind. 1) Permissions matter. Make sure that your keys are not world readable (this should be secure) Run chmod 400 on authorized_keys file.</p>
<p>If you had a set of keys already setup in .ssh/ on your local machine and want to install the new keys in another directory so as not to overwrite the old pair, you need to add them to ssh with this command</p>
<pre class="wp-code-highlight prettyprint">
ssh-add ~/full/path/to/your/new/keys
</pre>
<p>More information is available here <a href="http://www.debian-administration.org/articles/152 ">http://www.debian-administration.org/articles/152<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/linux/adding-publicprivate-key-pairs-on-mac-os-x-and-ubuntu-for-passwordless-remote-ssh-sessions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OpenSSL Certificate Generation Information for Certificate Authority to Serve Traffic Over Https</title>
		<link>http://seanbehan.com/linux/openssl-certificate-generation-information-for-certificate-authority-to-serve-traffic-over-https/</link>
		<comments>http://seanbehan.com/linux/openssl-certificate-generation-information-for-certificate-authority-to-serve-traffic-over-https/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 21:43:26 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[certificate]]></category>
		<category><![CDATA[common name]]></category>
		<category><![CDATA[https]]></category>
		<category><![CDATA[openssl]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=483</guid>
		<description><![CDATA[apt-get install openssl openssl genrsa -des3 -out server.key 1024 openssl req -new -key server.key -out server.csr You&#8217;ll be prompted to enter a password (don&#8217;t forget it!) as well as fill in company identity information. The most important part is the common name, which is actually the domain you are requesting the certificate for. If you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Flinux%2Fopenssl-certificate-generation-information-for-certificate-authority-to-serve-traffic-over-https%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="OpenSSL Certificate Generation Information for Certificate Authority to Serve Traffic Over Https" data-url="http://seanbehan.com/linux/openssl-certificate-generation-information-for-certificate-authority-to-serve-traffic-over-https/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><pre class="wp-code-highlight prettyprint">
apt-get install openssl
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
</pre>
<p>You&#8217;ll be prompted to enter a password (don&#8217;t forget it!) as well as fill in company identity information. The most important part is the common name, which is actually the domain you are requesting the certificate for. If you&#8217;re going without a wildcard certificate you can specify the subdomain ( secure.seanbehan.com ) otherwise it assumes www.seanbehan.com and seanbehan.com to be the same, and will cover both domains www.seanbehan.com and  seanbehan.com&#8230; however, it will not cover anything.seanbehan.com. Unless you get a wildcard certificate (these cost more money). Enter company details such as country code, state and the rest are pretty self explanatory.</p>
<p>You need to then submit the server.csr file contents to a certificate authority like godaddy, verisign, etc.<br />
Grab the contents by opening up the file</p>
<pre class="wp-code-highlight prettyprint"> vim server.csr </pre>
<p>After you submit it to them, they then will confirm that everything is correct and then give you the signed certificate back for your use on your server. Unless of course you&#8217;re faking your company details and are an evil, wicked spammer!</p>
<p>The certificate authority (CA) should give you instructions for installing the cert, as well as other files so that you can serve secure pages w/out any browser troubles!</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/linux/openssl-certificate-generation-information-for-certificate-authority-to-serve-traffic-over-https/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

