sshd 418 B

12345678910111213
  1. #!/bin/bash
  2. set -o errexit -o pipefail
  3. if [[ "$OS" = "Darwin" ]]; then
  4. # installed by default need to enable
  5. if ! launchctl | grep -q org.openbsd.ssh-agent; then
  6. echo "Enabling system ssh server. You may need to authenticate as an admin to do this ..."
  7. sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
  8. fi
  9. else
  10. # enabled by default but need to install
  11. has sshd || gimme_pkg openssh-server
  12. fi