我在frontendmaster上学习了面向前端工程师的全栈课程。
我使用的是数字海洋服务器。我通过设置PermitRootLogin no
禁用了根访问,并在authorized_key
文件中添加了我的公钥,这样我就可以登录了。
然后:sudo tail -f /var/log/auth.log
Oct 7 08:42:17 ubuntu-512mb-sgp1-01-fem-young sshd[16857]: Invalid user user from 74.208.145.162
Oct 7 08:42:17 ubuntu-512mb-sgp1-01-fem-young sshd[16857]: input_userauth_request: invalid user user [preauth]
Oct 7 08:42:17 ubuntu-512mb-sgp1-01-fem-young sshd[16857]: Connection closed by 74.208.145.162 port 58905 [preauth]
Oct 7 08:42:23 ubuntu-512mb-sgp1-01-fem-young sshd[16859]: Invalid user ubnt from 74.208.145.162
Oct 7 08:42:23 ubuntu-512mb-sgp1-01-fem-young sshd[16859]: input_userauth_request: invalid user ubnt [preauth]
Oct 7 08:42:23 ubuntu-512mb-sgp1-01-fem-young sshd[16859]: Connection closed by 74.208.145.162 port 59157 [preauth]
Oct 7 08:42:26 ubuntu-512mb-sgp1-01-fem-young sshd[16861]: Connection closed by 74.208.145.162 port 59446 [preauth]
Oct 7 08:42:31 ubuntu-512mb-sgp1-01-fem-young sshd[16863]: Invalid user admin from 74.208.145.162
Oct 7 08:42:31 ubuntu-512mb-sgp1-01-fem-young sshd[16863]: input_userauth_request: invalid user admin [preauth]
Oct 7 08:42:32 ubuntu-512mb-sgp1-01-fem-young sshd[16863]: Connection closed by 74.208.145.162 port 59670 [preauth]
Oct 7 08:42:33 ubuntu-512mb-sgp1-01-fem-young sshd[16865]: Invalid user support from 74.208.145.162
Oct 7 08:42:33 ubuntu-512mb-sgp1-01-fem-young sshd[16865]: input_userauth_request: invalid user support [preauth]
Oct 7 08:42:34 ubuntu-512mb-sgp1-01-fem-young sshd[16865]: Connection closed by 74.208.145.162 port 59872 [preauth]
Oct 7 08:42:39 ubuntu-512mb-sgp1-01-fem-young sshd[16867]: Invalid user admin from 74.208.145.162
Oct 7 08:42:39 ubuntu-512mb-sgp1-01-fem-young sshd[16867]: input_userauth_request: invalid user admin [preauth]
Oct 7 08:42:40 ubuntu-512mb-sgp1-01-fem-young sshd[16867]: Connection closed by 74.208.145.162 port 59944 [preauth]
这是不是意味着我被黑了?如果是这样,我能做些什么来保护自己呢?
发布于 2017-10-07 22:15:41
sudo命令可让最终用户充当root用户。
要禁用sudo访问,您需要编辑/etc/sudoers
文件。
sudoers
文件中的以下条目示例允许测试用户以来自任何终端的任何用户身份执行任何命令。
test ALL=(ALL) ALL
禁用测试用户的sudo您可以从/etc/sudoers
对上面的条目进行注释。
https://stackoverflow.com/questions/46618887
复制相似问题