Re: Защищённость ОТ сети
Добавлено: 26 янв 2017, 00:26
Авторизация SSH ...
3-мя попытками входа ограничивается не сервер, а SSH-клиент:
И один из моих придурков пробует проломиться:
6 попыток и не более!
Подсказали ... поискали ... разобрались...Olej писал(а): Я этого не понимаю: какое бы не установить значение MaxAuthTries (или дефаултное 6) - допускается неизменно 3 попытки авторизации.
Я завёл 2-х пользователей-придурков с красивыми именами freak и stupid ... и вот (после рестарта sshd):
3-мя попытками входа ограничивается не сервер, а SSH-клиент:
Код: Выделить всё
[olej@dell IDE]$ man 5 ssh_config
...
NumberOfPasswordPrompts
Specifies the number of password prompts before giving up. The argument to this keyword must be an integer. The default is 3.
Код: Выделить всё
[root@dell ssh]# tail -n1 /etc/ssh/ssh_config
NumberOfPasswordPrompts 6
[root@dell ssh]# cat /etc/ssh/sshd_config | grep MaxAuthTries
MaxAuthTries 10
[root@dell ssh]# service sshd restart
Redirecting to /bin/systemctl restart sshd.service
Код: Выделить всё
[stupid@dell ~]$ whoami
stupid
[stupid@dell ~]$ ssh stupid@localhost
stupid@localhost's password:
Permission denied, please try again.
stupid@localhost's password:
Permission denied, please try again.
stupid@localhost's password:
Permission denied, please try again.
stupid@localhost's password:
Permission denied, please try again.
stupid@localhost's password:
Permission denied, please try again.
stupid@localhost's password:
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).