dushaoshuai / dushaoshuai.github.io

0 stars 0 forks source link

SSH: 限定某个IP的登录方式 #49

Open dushaoshuai opened 1 year ago

dushaoshuai commented 1 year ago
# /etc/ssh/sshd_config
# IP A.B.C.E 可以使用密码登录,也可以使用公钥登录
Match Address A.B.C.E
    PasswordAuthentication yes
        PubkeyAuthentication yes
        AuthenticationMethods publickey password

See also

Match Introduces a conditional block