Клиент OpenSSH_5.9p1 не добавит новое соединение?

Я запускаю Ubuntu 12.04 ssh сервер/клиент, чтобы отправить файлы поставщикам, с которыми мы работаем. Недавно я попытался добавить нового поставщика путем отправки им моего id_rsa.pub файл, но не мог соединиться. Я проверял это локально, и я нашел, что мой ssh клиент не соединится ни с какими новыми серверами. ssh клиент никогда не представляет стандартный вопрос т.е.

Подлинность хоста x.x.x.x......... Вы уверены, что хотите продолжить соединяться (да/нет).

Я попытался подключить к трем локальным серверам все с тем же отрицательным результатом. Все другие клиенты могут соединиться с этими теми же тремя прекрасными серверами.

Я не могу соединиться с этими серверами, если я не экспортирую мой id_rsa.pub к их authorized_keys

Если я помещаю свой открытый ключ в эти серверы, он все еще перестал работать с

Проверка ключа хоста перестала работать

никогда не прося пароль. Моя работа вокруг ssh -o StrictHostKeyChecking=no user@server. Только после того, как я экспортировал мой id_rsa.pub к удаленному authorized_keys.

Вопрос затем состоит в том, почему меня никогда не просят добавить новый ключ к 'known_hosts' и почему я должен экспортировать открытый ключ для соединения?

  • Я переустановил ssh клиент, никакое изменение.
  • очищенный known_hosts файл с ssh-keygen -R x.x.x.x.
  • удаленный known_hosts файл.
  • очищенная связка ключей: ran eval "$(ssh-agent)", ssh-add -D, and ssh-add.
  • для known_hosts полномочия я попробовал 600 и 644.

Спасибо

netmgr@FTP-Inside:~/.ssh$ ssh -vvv sfhftp@10.20.11.11
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 10.20.11.11 [10.20.11.11] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/netmgr/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/netmgr/.ssh/id_rsa type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/netmgr/.ssh/id_rsa-cert type -1
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/netmgr/.ssh/id_dsa" as a RSA1 public key
debug1: identity file /home/netmgr/.ssh/id_dsa type 2
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: identity file /home/netmgr/.ssh/id_dsa-cert type -1
debug1: identity file /home/netmgr/.ssh/id_ecdsa type -1
debug1: identity file /home/netmgr/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH_4*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.1
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "10.20.11.11" from file "/home/netmgr/.ssh/known_hosts"
debug3: load_hostkeys: loaded 0 keys
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 110/256
debug2: bits set: 496/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA a3:03:06:34:55:04:b8:71:8f:b7:65:cc:43:a5:58:43
debug3: load_hostkeys: loading entries for host "10.20.11.11" from file "/home/netmgr/.ssh/known_hosts"
debug3: load_hostkeys: loaded 0 keys
Host key verification failed.
0
задан 18 February 2014 в 21:33

2 ответа

Глобальный конфигурационный файл /etc/ssh_config имел следующую директиву:

BatchMode yes

Это подавляет запрос пароля. Комментирование этой строки решило проблему.

0
ответ дан 18 February 2014 в 21:33

Проверьте, разрешает ли сервер аутентификацию по паролю. Чтобы поделиться своим ключом, вам нужно будет войти в систему один раз, и для этого вам потребуется аутентификация по паролю, если ваш ключ не был добавлен вручную в удаленный файл authorized_keys на стороне сервера, как вы это сделали.

На стороне сервера отредактируйте /etc/ssh/sshd_config, чтобы получить:

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes

Перезапустите сервер ssh с sudo service ssh restart на сервере.

Теперь отправьте ваш ключ на сервер с помощью ssh-copy-id username@remotehost

Когда ключ находится на удаленном сервере, вы можете отключить аутентификацию по паролю в /etc/ssh/sshd_config так же, как вы его включили, помня снова перезапустить ssh на сервер.

0
ответ дан 18 February 2014 в 21:33

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

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