Jump to content

Fox blog

  • entries
    7
  • comments
    0
  • views
    757

Manually upgrade OpenSSH on OS 10.9.x


Fox

81 views

Manually upgrade OpenSSH on OS 10.9.x

NOTE: Installation and testing was done on a clean Mavericks (OS 10.9) installation

 

Install Brew:

Install Homebrew prereqs:

xcode-select --install

Install Homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Enable Brew to override OSX system binaries

brew tap homebrew/dupes

Upgrade OpenSSL which is required for OpenSSH

brew install openssl

Upgrade OpenSSH

brew install openssh --with-brewed-openssl --with-keychain-support

Change default ssh-agent used by system

Make a backup of original plist file:

sudo cp /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist Desktop/

Edit the plist file:

sudo vim /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist 

Replace the following two lines:

<string>/usr/bin/ssh-agent</string>

        <string>-l</string>

With this:

<string>/usr/local/bin/ssh-agent</string>

        <string>-D</string>

NOTE the dash before the-D

 

Update the system to see the changes to the plist file:

launchctl unload /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist 

launchctl load -w /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist 

launchctl start org.openbsd.ssh-agent

launchctl list | grep org.openbsd.ssh

Replace the ssh system binary with a symlink to the new Brew'ed ssh binary

Backup the original binary:

sudo mv /usr/bin/ssh Desktop/

Create the symlink:

sudo ln -s /usr/local/bin/ssh /usr/bin/ssh

Add the following snipped to all users .bash_profile file

eval $(ssh-agent)

    function cleanup {

        echo \"Killing SSH-Agent\"

        kill -9 $SSH_AGENT_PID

    }

trap cleanup EXIT

Reboot the system:

sudo shutdown -r now

Check that system is using the new SSH version

ssh -V

Remove homebrew dupes

brew untap homebrew/dupes

 

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...