Skip to content

Instantly share code, notes, and snippets.

@ijjvim
Forked from influx6/restart-ssh.bash
Created July 13, 2022 11:49
Show Gist options
  • Save ijjvim/dce7729b3f2abc3a998f96a38f2dbe1d to your computer and use it in GitHub Desktop.
Save ijjvim/dce7729b3f2abc3a998f96a38f2dbe1d 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