User Tools

Site Tools


software:service:ssh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
software:service:ssh [2021/12/31 18:48] warnaudsoftware:service:ssh [2025/02/18 08:44] (current) warnaud
Line 1: Line 1:
 +====== SSH ======
 +===== sshd_config =====
 +After change, restart sshd unit (systemd)\\
 +Edit /etc/ssh/sshd_config
 +==== no IPv6 ====
 +<code perl>
 +#AddressFamily any
 +AddressFamily inet
 +</code>
 +
 +==== Root key only ====
 +<code perl>
 +PermitRootLogin prohibit-password
 +#PermitRootLogin yes
 +</code>
 +==== Users key only ====
 +<code perl>
 +PubkeyAuthentication yes
 +...
 +# To disable tunneled clear text passwords, change to no here!
 +PasswordAuthentication no
 +PermitEmptyPasswords no
 +</code>
 +
 +==== Check ====
 +<code bash> sudo sshd -T | grep -E '^(passwordauthentication|pubkeyauthentication)'
 +</code>
 +===== .ssh/config =====
 +
 +===== examples =====