Skip to content

Instantly share code, notes, and snippets.

@stefgosselin
Forked from influx6/restart-ssh.bash
Created December 16, 2022 16:05
Show Gist options
  • Save stefgosselin/74c2910522803a13bed2ac4907537e47 to your computer and use it in GitHub Desktop.
Save stefgosselin/74c2910522803a13bed2ac4907537e47 to your computer and use it in GitHub Desktop.
Restart SSH on Mac Terminal (High Sierra)
# high sierra
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
# latest
sudo vim /etc/services # (update the port config for ssh and save)
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment