unixorn/tumult.plugin.zsh

View on GitHub
bin/enable-ssh-server

Summary

Maintainability
Test Coverage
#!/usr/bin/env bash
#
# Enable the SSH server on macOS and configure it to start every boot
#
# Copyright 2016, Joe Block <jpb@ApesSeekingKnowledge.net>

set -o pipefail

if [[ "$(uname -s)" = 'Darwin' ]]; then
  exec sudo -s launchctl load -w /System/Library/LaunchDaemons/ssh.plist
else
  echo 'This only works on macOS'
  exit 1
fi