sshd
Installation
SKILL.md
Identity
- Unit:
sshd.service(orssh.serviceon some Debian systems) - Config:
/etc/ssh/sshd_config,/etc/ssh/sshd_config.d/(drop-in dir) - Logs:
journalctl -u sshd/journalctl -u ssh,/var/log/auth.log(Debian),/var/log/secure(RHEL) - User: runs as root (drops privs per session)
- Install: pre-installed on most distros;
apt install openssh-server/dnf install openssh-server
Key Operations
- Validate config:
sudo sshd -t - Reload (without dropping connections):
sudo systemctl reload sshd - Restart (drops active sessions!):
sudo systemctl restart sshd - Test connection:
ssh -v user@host(verbose, shows auth methods tried) - Check effective config:
sudo sshd -T(shows full parsed config with defaults) - Test config for specific user:
sudo sshd -T -C user=myuser,host=1.2.3.4
Expected Ports
- 22/tcp (default); commonly changed to reduce noise
- Verify:
ss -tlnp | grep sshd
Related skills