Bug 38977 - Нет набора правил control для включения keyboard-interactive аутентификации
Summary: Нет набора правил control для включения keyboard-interactive аутентификации
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: openssh-server-control (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 enhancement
Assignee: Gleb F-Malinovskiy
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-22 09:57 MSK by Stanislav Levin
Modified: 2023-10-30 10:25 MSK (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Levin 2020-09-22 09:57:31 MSK
При PAM стеке sshd "из коробки":
```
# cat /etc/pam.d/sshd
#%PAM-1.0
auth            required        pam_userpass.so
auth            include         common-login-use_first_pass
account         include         common-login
password        include         common-login
session         include         common-login
```

и
```
# tail -3 /etc/openssh/sshd_config
UsePAM yes
ChallengeResponseAuthentication yes
PasswordAuthentication no
```

метод аутентификации keyboard-interactive не работает:
```
# ssh -v -o PreferredAuthentications=keyboard-interactive -o PubkeyAuthentication=no -o GSSAPIAuthentication=no -o StrictHostKeyChecking=no -l test localhost true

...

debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,gssapi-with-mic,keyboard-interactive
debug1: No more authentication methods to try.
ssh: test@localhost: Permission denied (publickey,gssapi-with-mic,keyboard-interactive).
```

Как соответственно не работают и различные варианты 2FA.

Вариант исправления проблемы заключается в изменении PAM стека:
```
# cat /etc/pam.d/sshd
#%PAM-1.0
auth            include         common-login
account         include         common-login
password        include         common-login
session         include         common-login
```

Считаю задачу по разрешению keyboard-interactive аутентификации и изменению PAM стека типовой, в частности в среде домена FreeIPA. Предлагаю добавить соответствующий набор правил для control.