From: "Alexei V. Mezin" <alexei.mezin@gmail.com> To: community@lists.altlinux.org Subject: [Comm] Непонятное что-то с ssh клиентом Date: Tue, 11 Jun 2024 01:03:27 +0300 Message-ID: <v47u55$87j$1@ciao.gmane.io> (raw) In-Reply-To: <v3o3jh$r05$1@ciao.gmane.io> Продолжаю попытки запустить 2FA, на основе google authenticator или oath. Ничего не помогает :( pamtester sshd USERNAME authenticate работает отлично, спрашивает пароль, затем код. То есть PAM работает ровно так, как ожидается. Значит виноват ssh! Обнаружил вот такое: имеется сервер с p10, в /etc/pam.d/sshd включен вызов google authenticator. При попытке зайти по ssh на этот хост с машины с p10 все получается. Если попытаться зайти с машины с p11, то залогиниться невозможною! Как так? Почему от версии клиента зависит возможность входа?!! Вот что в логах клиента: с работающей машины debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: publickey debug1: Trying private key: /home/alexei/.ssh/id_ed25519 debug1: Trying private key: /home/alexei/.ssh/id_rsa debug1: Trying private key: /home/alexei/.ssh/id_ecdsa debug1: Trying private key: /home/alexei/.ssh/id_dsa debug1: Trying private key: /home/alexei/.ssh/id_xmss debug2: we did not send a packet, disable method debug1: Next authentication method: keyboard-interactive debug2: userauth_kbdint debug2: we sent a keyboard-interactive packet, wait for reply debug2: input_userauth_info_req debug2: input_userauth_info_req: num_prompts 1 Password: debug2: input_userauth_info_req debug2: input_userauth_info_req: num_prompts 1 Verification code: 423918 debug2: input_userauth_info_req debug2: input_userauth_info_req: num_prompts 0 debug1: Authentication succeeded (keyboard-interactive). Authenticated to 192.168.200.254 ([192.168.200.254]:2022). а вот с неработающей debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Next authentication method: publickey debug1: Will attempt key: /home/builder/.ssh/id_ed25519 debug1: Will attempt key: /home/builder/.ssh/id_ed25519_sk debug1: Will attempt key: /home/builder/.ssh/id_rsa RSA SHA256:rY52T/bfdmkk3Rs7re8vC1S41STJn437VocwteGAms4 debug1: Will attempt key: /home/builder/.ssh/id_ecdsa debug1: Will attempt key: /home/builder/.ssh/id_ecdsa_sk debug1: Will attempt key: /home/builder/.ssh/id_dsa debug1: Will attempt key: /home/builder/.ssh/id_xmss debug2: pubkey_prepare: done debug1: Trying private key: /home/builder/.ssh/id_ed25519 debug1: Trying private key: /home/builder/.ssh/id_ed25519_sk debug1: Offering public key: /home/builder/.ssh/id_rsa RSA SHA256:rY52T/bfdmkk3Rs7re8vC1S41STJn437VocwteGAms4 debug2: we sent a publickey packet, wait for reply debug1: Authentications that can continue: publickey,password,keyboard-interactive debug1: Trying private key: /home/builder/.ssh/id_ecdsa debug1: Trying private key: /home/builder/.ssh/id_ecdsa_sk debug1: Trying private key: /home/builder/.ssh/id_dsa debug1: Trying private key: /home/builder/.ssh/id_xmss debug2: we did not send a packet, disable method debug1: Next authentication method: password alexei@192.168.200.254's password: debug2: we sent a password packet, wait for reply debug1: Authentications that can continue: publickey,password,keyboard-interactive ssh: Permission denied, please try again. То есть в обоих случаях перечислены одинаковые методы аутентификации publickey,password,keyboard-interactive И в обоих случаях сначала проверяется наличие ключа. Но ключа нет. А потом в работающем случае объявляется, что далее keyboard-interactive, и запрашивается пароль, затем проверочный код, и в итоге удачный вход в систему. А во втором случае переходит к password, выдается запрос на пароль, но даже при верном пароле аутентификации не происходит, и запрос на ввод кода не появляется. Хотя запрос допжен появляться всегда, даже при неправильном пароле. Различия в системах в версии клиента.
next prev parent reply other threads:[~2024-06-10 22:03 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-06-04 10:20 [Comm] TOTP 2FA - кто-то использует? Алексей В. Мезин 2024-06-04 22:14 ` Alexei V. Mezin 2024-06-10 22:03 ` Alexei V. Mezin [this message] 2024-06-11 20:16 ` [Comm] Непонятное что-то с ssh клиентом Alexei V. Mezin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='v47u55$87j$1@ciao.gmane.io' \ --to=alexei.mezin@gmail.com \ --cc=community@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git