title: Upgrade openssh on OS X with homebrew for PCI compliance
body: <p>The existing version of openssh on OS X 10.7.4 is SSH-2.0-OpenSSH_5.6, which is not, unfortunately, PCI Compliant. So, I need to upgrade it and I have been trying to do so with Homebrew.</p>
  
  <p>So far, what I've done is:</p>
  
  <pre><code>brew tap homebrew/dupes
  brew install openssh
  </code></pre>
  
  <p>No problem, all went well, and now when I try <code>which ssh</code> I get:</p>
  
  <pre><code>/usr/local/bin/ssh
  </code></pre>
  
  <p>Which seems fine, also <code>which sshd</code> gives:</p>
  
  <pre><code>/usr/local/sbin/sshd
  </code></pre>
  
  <p>and <code>ssh -v</code> duly reports:</p>
  
  <pre><code>OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011
  </code></pre>
  
  <p>So far so good. But here's where I'm out of my element. Port 22 is still using the OS installed version, which is to say that <code>telnet hostname 22</code> reports:</p>
  
  <pre><code>SSH-2.0-OpenSSH_5.6
  </code></pre>
  
  <p>I've tried mucking around with /System/Library/LaunchDaemons/ssh.plist with no luck.</p>
  
  <p>So, my questions are (probably in reverse order of importance):</p>
  
  <ol>
  <li>How do I get my Homebrew installation of openssh to be the one listening on port 22?</li>
  <li>If I do, will this cause any conflicts with OS X or other software?</li>
  <li>Is the way I'm going about this a reasonable one in the first place?</li>
  <li>Am I not thinking about things that I should be?</li>
  <li>Is this a terrible idea to begin with?</li>
  </ol>
  
  <p>I'm frustrated about not passing the PCI Compliance scan and need to get this figured out, and frankly I'm considering changing all the e-commerce websites on my server over to stripe.com, but I would like to get this figured out. Also, does anyone know if openssh will be upgraded in Mountain Lion?</p>
  
  <p><strong>Edit:</strong> Here's what I've been trying in /System/Library/LaunchDaemons/ssh.plist:</p>
  
  <p>I've only edited one line, changing:</p>
  
  <pre><code>&lt;string&gt;/usr/sbin/sshd&lt;/string&gt;
  </code></pre>
  
  <p>To</p>
  
  <pre><code>&lt;string&gt;/usr/local/sbin/sshd&lt;/string&gt;
  </code></pre>
  
  <p>And then I tried <code>sudo kill -HUP 1</code> as suggested by @the-paul below, as well as restarting the Mac.</p>
  
  <p>Telnetting in from a remote still shows <code>SSH-2.0-OpenSSH_5.6</code></p>
  
  <p>My whole ssh.plist file now looks like this: <a href="http://pastie.org/private/qnhofuxomawjdypp9wgaq" rel="noreferrer">http://pastie.org/private/qnhofuxomawjdypp9wgaq</a></p>