Start a test daemon without detaching, useful for troubleshooting.
Section: sshd Basics
Run sshd in debug foreground mode
bash
bash
sudo /usr/sbin/sshd -D -d -p 2222Explanation
Start a test daemon without detaching, useful for troubleshooting.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing sshd Basics
Test config for specific user/addr
Evaluate Match blocks for a chosen user and source address.
Restart sshd with systemd
Restart the SSH daemon on systemd-based Linux hosts.