Difference between revisions of "PasswordAuthentication"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
<code>PasswordAuthentication</code> default is ''yes''. | <code>PasswordAuthentication</code> default is ''yes''. | ||
− | + | ===Match=== | |
[[Match (OpenSSH)|Match]] User <username> | [[Match (OpenSSH)|Match]] User <username> | ||
PasswordAuthentication yes | PasswordAuthentication yes | ||
− | + | ===PermitRootLogin=== | |
[[PermitRootLogin]] yes | [[PermitRootLogin]] yes | ||
PasswordAuthentication no | PasswordAuthentication no | ||
Line 14: | Line 14: | ||
− | + | *<code>[[sed -i]] 's/PasswordAuthentication yes/PasswordAuthentication no/g' [[/etc/ssh/sshd_config]] && [[systemctl restart sshd]]</code> | |
− | |||
== Related terms == | == Related terms == |
Revision as of 09:18, 6 October 2021
PasswordAuthentication directive in sshd_config
PasswordAuthentication
default is yes.
Match
Match User <username> PasswordAuthentication yes
PermitRootLogin
PermitRootLogin yes PasswordAuthentication no Match User root PasswordAuthentication yes
sed -i 's/PasswordAuthentication yes/PasswordAuthentication no/g' /etc/ssh/sshd_config && systemctl restart sshd
Related terms
See also
Advertising: