Пароль всегда требуется, даже если в sshd_config PasswordAuthentication нет

У меня 5 VPS Ubuntu 18.04 LTS.
Конфигурация SSH одинакова для всех.

  • Нет корневого доступа
  • Пользователь2 с разрешениями «sudo»
  • Нет запроса пароля
  • Доступ через ключ SSH RSA

С моего компьютера (Xubuntu 18.04) для доступа к 4 серверам мне необходимо:

  1. ssh user2@Server (я использую файл конфигурации)
  2. ввести кодовую фразу
  3. Я вошел как User2
  4. su - и пароль root для входа в систему как root.

Только для одного сервера, все то же самое, но после ключевой фразы у меня все еще спрашивают пароль User2.
Я не могу понять, почему и как решить проблему.
Я проверил права на файл author_keys (0600).
Это содержимое sshd_config.

Port 22
LoginGraceTime 1m
PermitRootLogin no
PubkeyAuthentication yes
AuthorizedKeysFile  .ssh/authorized_keys
PasswordAuthentication no
PermitEmptyPasswords no
ChallengeResponseAuthentication yes
UsePAM yes
X11Forwarding no
PrintMotd no
Banner /etc/ssh/banner-login.txt
AcceptEnv LANG LC_*
Subsystem   sftp    /usr/lib/openssh/sftp-server

======= Обновление ==========
С помощью -vvv я вижу эти (последние строки)

...
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:xxxxxxxxxxxx
debug3: hostkeys_foreach: reading file "/home/pc-user/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/pc-user/.ssh/known_hosts:8
debug3: load_hostkeys: loaded 1 keys from server
debug3: hostkeys_foreach: reading file "/home/pc-user/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/pc-user/.ssh/known_hosts:9
debug3: load_hostkeys: loaded 1 keys from IP-Server
debug1: Host 'server' is known and matches the ECDSA host key.
debug1: Found key in /home/pc-user/.ssh/known_hosts:8
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug2: key: ./.ssh/OpenSSH-Private.txt ((nil)), explicit
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: input_userauth_banner
** My Banner **
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,keyboard-interactive
debug3: start over, passed a different list publickey,keyboard-interactive
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: ./.ssh/OpenSSH-Private.txt
Enter passphrase for key './.ssh/OpenSSH-Private.txt': 
debug3: sign_and_send_pubkey: xxxxxxxxxxxx
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,keyboard-interactive
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug3: send packet: type 50
debug2: we sent a keyboard-interactive packet, wait for reply
debug3: receive packet: type 60
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password: 
0
задан 8 July 2019 в 11:51

0 ответов

Другие вопросы по тегам:

Похожие вопросы: