Я пытался настроить ssh без пароля b / w A
к B
и B
к A
также.Сгенерировал открытый и закрытый ключи с помощью ssh-keygen -trsa
на обеих машинах.Использовал ssh-copy-id
утилита для копирования открытых ключей из A
к B
так же как B
к A
.
SSH без пароля работает с A
к B
но not
от B
к A
. Я проверил разрешения папки ~ /ssh / и, похоже, все в порядке.
A's .ssh
права доступа к папкам:
-rw------- 1 root root 13530 2011-07-26 23:00 known_hosts-rw------- 1 root root 403 2011-07-27 00:35 id_rsa.pub-rw------- 1 root root 1675 2011-07-27 00:35 id_rsa-rw------- 1 root root 799 2011-07-27 00:37 authorized_keysdrwxrwx--- 70 root root 4096 2011-07-27 00:37 ..drwx------ 2 root root 4096 2011-07-27 00:38 .
B's .ssh
права доступа к папкам:
-rw------- 1 root root 884 2011-07-07 13:15 known_hosts-rw-r--r-- 1 root root 396 2011-07-27 00:15 id_rsa.pub-rw------- 1 root root 1675 2011-07-27 00:15 id_rsa-rw------- 1 root root 2545 2011-07-27 00:36 authorized_keysdrwxr-xr-x 8 root root 4096 2011-07-06 19:44 ..drwx------ 2 root root 4096 2011-07-27 00:15 .
A
is an ubuntu 10.04 (OpenSSH_5. 3p1 Debian-3ubuntu4, OpenSSL 0.9.8 k 25 марта 2009) B
это машина debian (OpenSSH_5. 1p1 Debian-5, OpenSSL 0.9.8 g 19 Oct 2007)
От A
:
#ssh B
работает нормально.
От B
:
#ssh -vvv A ......debug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug2: key: /root/.ssh/identity ((nil))debug2: key: /root/.ssh/id_rsa (0x7f1581f23a50)debug2: key: /root/.ssh/id_dsa ((nil))debug3: Wrote 64 bytes for a total of 1127debug1: Authentications that can continue: publickey,passworddebug3: start over, passed a different list publickey,passworddebug3: preferred gssapi-keyex,gssapi-with-mic,gssapi,publickey,keyboard-interactive,passworddebug3: authmethod_lookup publickeydebug3: remaining preferred: keyboard-interactive,passworddebug3: authmethod_is_enabled publickeydebug1: Next authentication method: publickeydebug1: Trying private key: /root/.ssh/identitydebug3: no such identity: /root/.ssh/identitydebug1: Offering public key: /root/.ssh/id_rsadebug3: send_pubkey_testdebug2: we sent a publickey packet, wait for replydebug3: Wrote 368 bytes for a total of 1495debug1: Authentications that can continue: publickey,passworddebug1: Trying private key: /root/.ssh/id_dsadebug3: no such identity: /root/.ssh/id_dsadebug2: we did not send a packet, disable methoddebug3: authmethod_lookup passworddebug3: remaining preferred: ,passworddebug3: authmethod_is_enabled passworddebug1: Next authentication method: passwordroot@192.168.122.1's password:
Что, по сути, означает, что он не проверяет подлинность с помощью файла /root/id_rsa
. Я запустил ssh-add
командуйте также на обеих машинах.
Аутентификационная часть /etc/ssh/sshd_config
файл является
# Authentication:LoginGraceTime 120PermitRootLogin yesStrictModes yesRSAAuthentication yesPubkeyAuthentication yes#AuthorizedKeysFile %h/.ssh/authorized_keys# Don't read the user's ~/.rhosts and ~/.shosts files
У меня заканчиваются идеи.Любая помощь была бы признательна.