在指定IP的机器上输入命令:

vim /etc/ssh/sshd_config

在末尾输入:

AllowUsers [email protected]

即允许192.168.1.10 登录root账户

如需新增可登录IP,按格式再新添加一行即可。

重启SSH服务,输入命令:

systemctl restart sshd
Last modification:October 13th, 2022 at 01:04 pm