On Пан, 27 мая 2024, seojeong kim via FreeIPA-users wrote:
For offline authentication mode, I have to give up single prompting.
then,,
I should get pwd and otp seperately.
2fa user / 2 factor input separately,
Can I use sshpass ? As I research , I can't find any way to convey pwd and otp
seperately by using sshpass.
I don't think you'd be able to use sshpass without modifications.
sshpass does not take into account multiple prompts.
You probably best to switch to GSSAPI authentication instead: obtain a
Kerberos ticket to this user locally and then use that ticket to
authenticate to your SSH server.
Another alternative is to use SSH keys.
--
/ Alexander Bokovoy
Sr. Principal Software Engineer
Security / Identity Management Engineering
Red Hat Limited, Finland