macOS(BSD system) 禁用 ssh 密码登录
1
As any BSD system you should toggle off some options in your sshd_:
2
3
sudo vim /etc/ssh/sshd_config
4
5
UsePam yes # it will not be used
6
ChallengeResponseAuthentication no
7
PasswordAuthentication no
8
kbdInteractiveAuthentication no
Copied!
1
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
2
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
Copied!
复制链接