Skip to content

Instantly share code, notes, and snippets.

@jj1bdx
Last active October 4, 2016 05:38
Show Gist options
  • Save jj1bdx/e6ca66eddbab824590d4 to your computer and use it in GitHub Desktop.
Save jj1bdx/e6ca66eddbab824590d4 to your computer and use it in GitHub Desktop.
OpenSSH config example for OS X Yosemite 10.10.x
brew tap homebrew/dupes
# For OpenSSH 6.9p1 or later
brew install openssh --with-ldns
# NOTE: editing LaunchAgent is no longer supported in HomeBrew
# See https://github.com/Homebrew/homebrew-dupes/pull/482#issuecomment-118994372
# edit LaunchDaemons (as administrator/root)
launchctl unload -w /System/Library/LaunchDaemons/ssh.plist
vi /System/Library/LaunchDaemons/ssh.plist
launchctl load -w /System/Library/LaunchDaemons/ssh.plist
# check sshd_config
# output of /usr/libexec/ApplicationFirewall/socketfilterfw --listapps
ALF: total number of apps = 4
[1,2,3: omitted]
4 : /usr/local/Cellar/openssh/6.6p1_1/sbin/sshd
( Allow incoming connections )
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<true/>
<key>Label</key>
<string>com.openssh.sshd</string>
<key>Program</key>
<string>/usr/local/sbin/sshd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/sbin/sshd</string>
<string>-i</string>
</array>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<key>SockServiceName</key>
<string>ssh</string>
<key>Bonjour</key>
<array>
<string>ssh</string>
<string>sftp-ssh</string>
</array>
</dict>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<false/>
</dict>
<key>StandardErrorPath</key>
<string>/dev/null</string>
<key>SHAuthorizationRight</key>
<string>system.preferences</string>
<key>POSIXSpawnType</key>
<string>Interactive</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment