<?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>Cain Manor &#187; Work</title> <atom:link href="http://cainmanor.com/category/tech/work/feed/" rel="self" type="application/rss+xml" /><link>http://cainmanor.com</link> <description>Your Guide To All Things Cain™</description> <lastBuildDate>Thu, 17 May 2012 19:43:34 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>Why my iPad 3 has Verizon LTE</title><link>http://cainmanor.com/tech/why-my-ipad-3-has-verizon-lte/</link> <comments>http://cainmanor.com/tech/why-my-ipad-3-has-verizon-lte/#comments</comments> <pubDate>Fri, 27 Apr 2012 17:20:28 +0000</pubDate> <dc:creator>Greg Cain</dc:creator> <category><![CDATA[Online]]></category> <category><![CDATA[Tech]]></category> <category><![CDATA[Work]]></category><guid
isPermaLink="false">http://cainmanor.com/?p=1263</guid> <description><![CDATA[I was thinking back to an earlier post, about AT&#38;T&#8217;s 3G coverage. This time around, I finally had a choice to go with Verizon. It&#8217;s LTE, which is a better technology (and AT&#38;T&#8217;s LTE is probably similar, but there isn&#8217;t LTE in Seattle for AT&#38;T.)  Here&#8217;s the results for my new Verizon LTE iPad (ignore [...]]]></description> <content:encoded><![CDATA[<p>I was thinking back to an earlier <a
title="Why my iPad doesn’t have 3G" href="http://cainmanor.com/interesting/why-my-ipad-doesnt-have-3g/">post</a>, about AT&amp;T&#8217;s 3G coverage. This time around, I finally had a choice to go with Verizon. It&#8217;s LTE, which is a better technology (and AT&amp;T&#8217;s LTE is probably similar, but there isn&#8217;t LTE in Seattle for AT&amp;T.)  Here&#8217;s the results for my new Verizon LTE iPad (ignore where it says iPhone. I&#8217;m using the same app on both the iPhone and iPad, but it&#8217;s not a universal app.)</p><div
id="attachment_1264" class="wp-caption alignnone" style="width: 310px"><a
href="http://photos.cainmanor.com/2012/04/SpeedTestResults-LTE.png" rel="lightbox[1263]"><img
class="size-full wp-image-1264 " title="SpeedTestResults - LTE" src="http://photos.cainmanor.com/2012/04/SpeedTestResults-LTE.png" alt="" width="300" height="135" /></a><p
class="wp-caption-text">Verizon LTE</p></div><p>For comparison, I went back and tested my iPhone again, now with a new 4G icon. The last time I did this, just about two years ago, I was about half a mile away from where I&#8217;m at now. Two years, and half a mile closer to Seattle, and I get this.</p><p><span
id="more-1263"></span></p><div
id="attachment_1265" class="wp-caption alignnone" style="width: 310px"><a
href="http://photos.cainmanor.com/2012/04/SpeedTestResults-ATT-4G.png" rel="lightbox[1263]"><img
class="size-full wp-image-1265 " title="SpeedTestResults - AT&amp;T 4G" src="http://photos.cainmanor.com/2012/04/SpeedTestResults-ATT-4G.png" alt="" width="300" height="135" /></a><p
class="wp-caption-text">AT&amp;T 4G</p></div><p>This is much better, but I&#8217;m in so close to Downtown Seattle that I was looking at Pike Place Market from the window of my office. For those not familiar, this is about as close to the heart of Seattle as you can be.</p><p>Now that the iPad has the same connectivity as I do at home, it&#8217;s a true take anywhere device. As an IT guy, I&#8217;m glad to be able to work anywhere (even though the iPad isn&#8217;t officially supported.)  I don&#8217;t think AT&amp;T is quite there yet, but I expect my new Verizon LTE iPhone 5 will be.</p> ]]></content:encoded> <wfw:commentRss>http://cainmanor.com/tech/why-my-ipad-3-has-verizon-lte/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Push SSH public keys to multiple host</title><link>http://cainmanor.com/tech/push-ssh-public-keys-to-mulitple-host/</link> <comments>http://cainmanor.com/tech/push-ssh-public-keys-to-mulitple-host/#comments</comments> <pubDate>Tue, 02 Aug 2011 18:27:52 +0000</pubDate> <dc:creator>Greg Cain</dc:creator> <category><![CDATA[OS-X]]></category> <category><![CDATA[Tech]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[Work]]></category><guid
isPermaLink="false">http://cainmanor.com/?p=1251</guid> <description><![CDATA[I&#8217;m starting a new job where I need to have my SSH keys pushed to hundreds of Red Hat servers. The special sauce is a command called ssh-copy-id. However, using this command requires you answering a (yes/no) question, then shortly thereafter enter your password. Painful. Here&#8217;s how push your keys without the pain. The first [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;m starting a new job where I need to have my SSH keys pushed to hundreds of Red Hat servers. The special sauce is a command called ssh-copy-id.  However, using this command requires you answering a (yes/no) question, then shortly thereafter enter your password.  Painful. Here&#8217;s how push your keys without the pain.<br
/> <span
id="more-1251"></span><br
/> The first problem is having to answer (yes/no) for each server.  Normally you see this&#8230;</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">The authenticity of host <span style="color: #ff0000;">'myfirsthost.work.cainmanor.com (10.256.33.106)'</span> can<span style="color: #ff0000;">'t be established.
RSA key fingerprint is fc:40:7c:de:b8:ac:a2:f5:d4:11:d0:0e:b2:77:8a:63.
Are you sure you want to continue connecting (yes/no)? yes</span></pre></div></div><p>To stop this prompt, we need to edit your ~/.ssh/config file.  Add these two lines</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">StrictHostKeyChecking no
<span style="color: #007800;">UserKnownHostsFile</span>=<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null</pre></div></div><p>Setting your UserKnownHostsFile should only be a temporary fix.  After you&#8217;ve pushed your keys, you should comment out both of those settings.</p><p>Your password is the next problem.  We can solve that with sshpass.  sshpass takes your password and passes it on when ssh ask for it.  There are three ways to do it, all of them insecure.  Read the man page and decide which of those you want to use.  For my purposes I just put it on the command line &#8211; I&#8217;m on my personal machine with no other users, and only I know the passwords to the box.  Don&#8217;t do this on a shared server.</p><p>Here is an example of how to push your public key one.  Try it on a new server to make sure you get the results you expect.</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">sshpass <span style="color: #660033;">-p</span> <span style="color: #ff0000;">'MY_PASSWORD'</span> ssh-copy-id gregc<span style="color: #000000; font-weight: bold;">@</span>new_host_with_no_keys</pre></div></div><p>Now that we&#8217;ve got the prompts turned off, we&#8217;ll wrap a script around this.  How you get the list of appropriate hostnames or IP&#8217;s is your business.</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> X <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> my_host_that_need_keys<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">do</span>
sshpass <span style="color: #660033;">-p</span> <span style="color: #ff0000;">'MY_PASSWORD'</span> ssh-copy-id gregc<span style="color: #000000; font-weight: bold;">@</span><span style="color: #800000;">${X}</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div><p>Happy Computing!!</p> ]]></content:encoded> <wfw:commentRss>http://cainmanor.com/tech/push-ssh-public-keys-to-mulitple-host/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>gpresult &#8211; Access Denied</title><link>http://cainmanor.com/tech/gpresult-access-denied/</link> <comments>http://cainmanor.com/tech/gpresult-access-denied/#comments</comments> <pubDate>Wed, 29 Apr 2009 06:18:58 +0000</pubDate> <dc:creator>Greg Cain</dc:creator> <category><![CDATA[Tech]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[Work]]></category><guid
isPermaLink="false">http://cainmanor.com/?p=569</guid> <description><![CDATA[While trying to make sure a GPO got applied on a Windows 2003 Server, I tried to run gpresult. I got &#8220;Access Denied.&#8221; Microsoft&#8217;s recommendation did not work, but it&#8217;s probably worth trying again. CD %windir%\system32\wbem For /f %s in ('dir /b /s *.dll') do regsvr32 /s %s wmiprvse /regserver I found THIS worked. cd [...]]]></description> <content:encoded><![CDATA[<p>While trying to make sure a GPO got applied on a Windows 2003 Server, I tried to run gpresult.  I got &#8220;Access Denied.&#8221;<br
/> <span
id="more-569"></span></p><p>Microsoft&#8217;s <a
href="http://support.microsoft.com/kb/932460">recommendation</a> did not work, but it&#8217;s probably worth trying again.</p><div
class="wp_syntax"><div
class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #b1b100; font-weight: bold;">CD</span> <span style="color: #33cc33;">%</span><span style="color: #448888;">windir</span><span style="color: #33cc33;">%</span>\system32\wbem
<span style="color: #00b100; font-weight: bold;">For</span> /f <span style="color: #33cc33;">%</span><span style="color: #448888;">s</span> <span style="color: #00b100; font-weight: bold;">in</span> <span style="color: #33cc33;">(</span>'<span style="color: #b1b100; font-weight: bold;">dir</span> /b /s *.dll'<span style="color: #33cc33;">)</span> <span style="color: #00b100; font-weight: bold;">do</span> regsvr32 /s <span style="color: #33cc33;">%</span><span style="color: #448888;">s</span>
wmiprvse /regserver</pre></div></div><p>I found <a
href="http://x220.minasi.com/forum/topic.asp?TOPIC_ID=20825">THIS</a> worked.</p><div
class="wp_syntax"><div
class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #b1b100; font-weight: bold;">cd</span> /d <span style="color: #33cc33;">%</span><span style="color: #448888;">windir</span><span style="color: #33cc33;">%</span>\system32
regsvr32 /n /I userenv.dll
<span style="color: #b1b100; font-weight: bold;">cd</span> wbem
mofcomp scersop.mof
gpupdate /force
gpresult</pre></div></div>]]></content:encoded> <wfw:commentRss>http://cainmanor.com/tech/gpresult-access-denied/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SSH Public and Private Key setup on OS-X</title><link>http://cainmanor.com/tech/ssh-public-and-private-key-setup-on-os-x/</link> <comments>http://cainmanor.com/tech/ssh-public-and-private-key-setup-on-os-x/#comments</comments> <pubDate>Thu, 05 Feb 2009 05:39:15 +0000</pubDate> <dc:creator>Greg Cain</dc:creator> <category><![CDATA[Online]]></category> <category><![CDATA[OS-X]]></category> <category><![CDATA[Tech]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[Work]]></category><guid
isPermaLink="false">http://cainmanor.com/tech/ssh-public-and-private-key-setup-on-os-x</guid> <description><![CDATA[I didn&#8217;t find one clear and concise place explaining how to setup private keys on OS-X. This is my attempt to remedy that. First, you need to generate the Private (id_dsa or id_rsa) and Public (id_dsa.pub or id_rsa.pub) Key pair. Properly secured machines don&#8217;t accept RSA encryption (rsa1) which was used by SSH v1 protocol, [...]]]></description> <content:encoded><![CDATA[<p>I didn&#8217;t find one clear and concise place explaining how to setup private keys on OS-X.  This is my attempt to remedy that.<br
/> <span
id="more-479"></span><br
/> First, you need to generate the Private (id_dsa or id_rsa) and Public (id_dsa.pub or id_rsa.pub) Key pair.  Properly secured machines don&#8217;t accept RSA encryption (rsa1) which was used by SSH v1 protocol, but they do accept RSA v2 and DSA, with DSA being arguably more secure.  For the -t option use either rsa or dsa, with dsa being preffered.  The rest of this article assumes you&#8217;re using dsa.  You are able to choose a passphrase, so pick something easy to remember and sufficiently complex.</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh-keygen</span> <span style="color: #660033;">-t</span> dsa <span style="color: #660033;">-f</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>id_dsa <span style="color: #660033;">-C</span> <span style="color: #ff0000;">&quot;your.email.address&quot;</span></pre></div></div><p>Copy the public key to the remote server</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">scp</span> id_dsa.pub username<span style="color: #000000; font-weight: bold;">@</span>remoteserver.com:~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span></pre></div></div><p>This whole exercise relies on correct permissions on important files.  You should keep your private key very secure, for reasons other than getting this to work correctly.</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">600</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh<span style="color: #000000; font-weight: bold;">/</span>id_dsa</pre></div></div><p>On the remote server, let&#8217;s add your public key to the authorized keys file, which lives in your home account</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> id_dsa.pub <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> authorized_keys2
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">644</span> authorized_keys2
<span style="color: #c20cb9; font-weight: bold;">chmod</span> <span style="color: #000000;">700</span> ~<span style="color: #000000; font-weight: bold;">/</span>.ssh</pre></div></div><p>Back on your local machine, you now need to authorize yourself to use the new public key.  For OS-X it easy.  Just connect to a box that has a shared key.  You&#8217;ll get <a
href="http://photos.cainmanor.com/2009/02/pk_password.png" rel="lightbox[479]"><img
class="size-medium wp-image-480 alignnone" title="pk_password" src="http://photos.cainmanor.com/2009/02/pk_password.png" alt="" width="300" height="175" /></a><br
/> To add identities to your keychain without the popup box (OS-X only)</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh-add</span> <span style="color: #660033;">-K</span></pre></div></div><p>To add the identities previously stored in your keychain (OS-X only)</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh-add</span> <span style="color: #660033;">-k</span></pre></div></div><p>For other unixes you can add the key manually (this works on OS-X too.)</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh-add</span></pre></div></div><p>To see what keys you have loaded (again, all Unixes, including OS-X)</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh-add</span> <span style="color: #660033;">-l</span></pre></div></div><p>To delete keys (this will delete from your keychain too)</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh-add</span> <span style="color: #660033;">-d</span></pre></div></div><p>There are a lot of cool things you can do with ssh-add.  The man pages are your friend.</p> ]]></content:encoded> <wfw:commentRss>http://cainmanor.com/tech/ssh-public-and-private-key-setup-on-os-x/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Easy way to ping a range of IP Addresses</title><link>http://cainmanor.com/tech/easy-way-to-ping-a-range-of-ip-addresses/</link> <comments>http://cainmanor.com/tech/easy-way-to-ping-a-range-of-ip-addresses/#comments</comments> <pubDate>Wed, 23 Apr 2008 17:49:54 +0000</pubDate> <dc:creator>Greg Cain</dc:creator> <category><![CDATA[OS-X]]></category> <category><![CDATA[Tech]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[Work]]></category><guid
isPermaLink="false">http://cainmanor.com/technology/easy-way-to-ping-a-range-of-ip-addresses</guid> <description><![CDATA[nmap -sP 10.1.1.0/24 When I need to find an open IP, this is a decent way to do it. I wish there were a way to find IPs that don&#8217;t respond, but this works for now. This won&#8217;t work if your network bans ICMP traffic, or your host doesn&#8217;t respond, but is alive. If you [...]]]></description> <content:encoded><![CDATA[<div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nmap</span> <span style="color: #660033;">-sP</span> 10.1.1.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span></pre></div></div><p>When I need to find an open IP, this is a decent way to do it.  I wish there were a way to find IPs that don&#8217;t respond, but this works for now.  This won&#8217;t work if your network bans ICMP traffic, or your host doesn&#8217;t respond, but is alive.</p><p>If you want to extract the IPs from your output, you can use this SED statement</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">'s/^.*[^0-9]\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*$/\1/p'</span></pre></div></div>]]></content:encoded> <wfw:commentRss>http://cainmanor.com/tech/easy-way-to-ping-a-range-of-ip-addresses/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
Database Caching 4/8 queries in 0.004 seconds using disk: basic
Object Caching 426/433 objects using disk: basic

Served from: cainmanor.com @ 2012-05-19 15:06:19 -->
