Restart SSH/sshd in Mac OS X

To restart ssh/sshd service in Mac OS X, you can simply run the following two commands together:

sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd

Your sshd will get restarted and your new ssh config file can be loaded as well.

p.s. Friendly reminding: DO NOT try to execute

sudo launchctl reboot com.openssh.sshd

instead since your computer will immediately get rebooted 🙂

Published by

vivo

This is Vivo. Yes, I'm Vivo.

One thought on “Restart SSH/sshd in Mac OS X”

Leave a Reply

Your email address will not be published. Required fields are marked *