Disable root login
PasswordAuthentication no          # Disable password authentication
PubkeyAuthentication yes           # Enable public key authentication
AuthorizedKeysFile .ssh/authorized_keys # Specify authorized_keys file location
AllowUsers newuser                 # Only allow specific users to login
</code></pre></div><p>此操作禁止除 SSH 之外的所有登录方式，除了您复制公钥的用户。阻止以 Root 身份登录，仅允许您指定的用户登录。按 CTL+S 保存，按 CTL+x