только для проверки подлинности RSA

2144
Siriss

Я пытаюсь настроить RSA-аутентификацию только по SSH / SFTP-серверу. SSH будет использоваться в основном для RDC. Все отлично работает, если я использую аутентификацию по паролю.

Я использую Putty Key Generator для создания ключей, и я вставил ключ в файл authorized_keys и перезапустил сервер OpenSSH. Я использую FileZilla для проверки SFTP-соединения, так как это наиболее важно. Для своих тестов я создал ключи без коррекции пароля.

Он также не будет работать со стандартным SSH-соединением. Там написано "Сервер отказался от нашего ключа". Я воссоздал ключ дважды, дважды проверив руководство с помощью Google, и я уверен, что сделал это правильно.

Я загружаю файл ключа в FileZilla в папке settings / SFTP и пытаюсь подключиться, и получаю следующую ошибку: Отключено: Поддерживаемые методы проверки подлинности недоступны.

Я играл с различными настройками всю ночь, и я не могу понять это. Вот мой файл sshd_config:

# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $  # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information.  # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin  # The strategy used for options in the default sshd_config shipped with # OpenSSH is to specify options with their default value where # possible, but leave them commented. Uncommented options change a # default value.  #Port 22 #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress ::  # Disable legacy (protocol version 1) support in the server for new # installations. In future the default will change to require explicit # activation of protocol 1 Protocol 2  # HostKey for protocol version 1 #HostKey /etc/ssh/ssh_host_key # HostKeys for protocol version 2 #HostKey /etc/ssh/ssh_host_rsa_key #HostKey /etc/ssh/ssh_host_dsa_key  # Lifetime and size of ephemeral version 1 server key #KeyRegenerationInterval 1h #ServerKeyBits 1024  # Logging # obsoletes QuietMode and FascistLogging #SyslogFacility AUTH #LogLevel INFO  # Authentication:  #LoginGraceTime 2m PermitRootLogin no #StrictModes yes #MaxAuthTries 6 #MaxSessions 10  RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys  # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 #HostbasedAuthentication no # Change to yes if you don't trust ~/.ssh/known_hosts for # RhostsRSAAuthentication and HostbasedAuthentication #IgnoreUserKnownHosts no # Don't read the user's ~/.rhosts and ~/.shosts files #IgnoreRhosts yes  # To disable tunneled clear text passwords, change to no here! PasswordAuthentication no PermitEmptyPasswords no  # Change to no to disable s/key passwords #ChallengeResponseAuthentication yes  # Kerberos options #KerberosAuthentication no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes #KerberosGetAFSToken no  # GSSAPI options #GSSAPIAuthentication no #GSSAPICleanupCredentials yes  # Set this to 'yes' to enable PAM authentication, account processing,  # and session processing. If this is enabled, PAM authentication will  # be allowed through the ChallengeResponseAuthentication and # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication via ChallengeResponseAuthentication may bypass # the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # and ChallengeResponseAuthentication to 'no'. UsePAM no 
2
Я мог бы еще раз взглянуть на этот раздел: # Для того, чтобы это работало, вам также понадобятся ключи хоста в / etc / ssh / ssh_known_hosts RhostsRSAAuthentication no Это может быть ошибкой ... Я также должен убедиться, что ключ RSA не для root авторизоваться. RobotHumans 13 лет назад 0
Спасибо за комментарий. Я проверил это и убедился, что все это прокомментировано, но это не имело никакого значения. Ключ RSA не предназначен для root-входа. Siriss 13 лет назад 0

1 ответ на вопрос

1
ccpizza

Putty Key Generator использует свой собственный формат ключа. Вы должны экспортировать ключ в формат OpenSSH, но даже это не сработало для меня, пока я вручную не отредактировал хеш, чтобы все было в одной строке.

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