How do I restart sshd on my Unix system | StarNet Knowledge Database – PC X, X Windows, X 11 & More – StarNet
Posted by jpluimers on 2021/11/17
[Wayback] How do I restart sshd on my Unix system | StarNet Knowledge Database – PC X, X Windows, X 11 & More – StarNet
RedHat and Fedora Core Linux
/sbin/service sshd restart
Suse linux
/etc/rc.d/sshd restart
Debian/Ubuntu
/etc/init.d/sshd restart
Solaris 9 and below
/etc/init.d/sshd stop
/etc/init.d/sshd startSolaris 10
svcadm disable ssh
svcadm enable sshAIX
stopsrc -s sshd
startsrc -s sshdHP-UX
/sbin/init.d/secsh stop
/sbin/init.d/secsh start
Note that for opensuse, by now you need this to restart sshd:
/usr/sbin/rcsshd restart
Edit 20211118: some tweets in reaction to this post
- [Archive] Jan-Theo Wassink on Twitter: “On OpenSuse (or any modern’ish’ distro) I’d use systemctl for daemon management. In this specific case ‘systemctl restart sshd.service’.… “
- [Archive] Jan-Theo Wassink on Twitter: “Just typing ‘systemctl (cmd) ssh’ will do tab-expansion for you. No need to remember them all. Even context aware, so when used after start it won’t show ones already running.… “
- [Archive] Jeroen Wiert Pluimers on Twitter: “It hangs after doing `systemctl restart ` for like 30 seconds, then beeps once. Falling back on good old commands that reliably work (;… “
–jeroen
Leave a Reply