EDIT: Изменил имя ключей ssh ​​на id_rsa, проблемы все еще есть..

EDIT: Изменил имя ключей ssh ​​на id_rsa, проблемы все еще есть..

Я попытался настроить публичные и приватные ключи на двух компьютерах (Clementine и cfmi), чтобы иметь возможность ssh-соединения между ними без использования пароля. Однако, у меня все еще запрашивают пароль, несмотря на то, что я включил публичный ключ в файл авторизованных ключей в ~/.ssh.

Я могу войти на сервер cfmi при попытке подключения из Clementine, однако мне предлагается ввести пароль.

Также может иметь значение, что сначала мне необходимо подключиться к сети VPN с помощью Cisco AnyConnect, и только после этого я смогу подключиться по ssh к cfmi, поскольку он защищен брандмауэром.

Однако, когда я пытаюсь подключиться с сервера cfmi к Clementine, мне предлагается ввести пароль.который не совпадает с паролем rootУ меня на этом компьютере. Таким образом я не могу войти из cfmi в clementine.

Все становится еще загадочнее... Пароль root прекрасно работает, когда я подключаюсь по ssh со своего iPhone в локальной сети.

Может ли кто-нибудь помочь мне разобраться, как заставить ключи работать и как сбросить пароль для ssh-подключения к Clementine?

EDIT: Изменил имя ключей ssh ​​на id_rsa, проблемы все еще есть..

Вот содержимое .ssh на клиенте (cfmi):

-rwx------. 1 se394 mriusers 1634 Sep 29 22:00 authorized_keys
-rwx------. 1 se394 mriusers 1633 Sep 29 22:00 authorized_keys~
-rw-------. 1 se394 mriusers 1675 Sep 29 21:17 clementine
-rw-r--r--. 1 se394 mriusers  415 Sep 28 19:52 clementine.pub
-rw-------. 1 se394 mriusers 1679 Sep 29 22:04 id_rsa
-rw-r--r--. 1 se394 mriusers  415 Sep 29 22:04 id_rsa.pub
-rw-r--r--. 1 se394 mriusers 1830 Sep 28 20:15 #known_hosts#
-rw-r--r--. 1 se394 mriusers 1043 Sep 29 00:13 known_hosts
-rw-r--r--. 1 se394 mriusers 1837 Sep 28 17:41 known_hosts~

А вот подробный вывод для cfmi, подключающегося к Clementine

se394 ~ $ ssh -v -v -v [email protected]
OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 51: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to clementine.duckdns.org [162.211.160.162] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/exports/home/se394/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /exports/home/se394/.ssh/id_rsa type 1
debug1: identity file /exports/home/se394/.ssh/id_rsa-cert type -1
debug1: identity file /exports/home/se394/.ssh/id_dsa type -1
debug1: identity file /exports/home/se394/.ssh/id_dsa-cert type -1
debug1: identity file /exports/home/se394/.ssh/id_ecdsa type -1
debug1: identity file /exports/home/se394/.ssh/id_ecdsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.4
debug1: Remote protocol version 2.0, remote software version Cisco-1.25
debug1: no match: Cisco-1.25
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "clementine.duckdns.org" from file "/exports/home/se394/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /exports/home/se394/.ssh/known_hosts:3
debug3: load_hostkeys: loaded 1 keys
debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],[email protected],ssh-rsa
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: [email protected],[email protected],ssh-rsa,[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[email protected],zlib
debug2: kex_parse_kexinit: none,[email protected],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-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
debug2: kex_parse_kexinit: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96
debug2: kex_parse_kexinit: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96
debug2: kex_parse_kexinit: none
debug2: kex_parse_kexinit: none
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-cbc hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug2: dh_gen_key: priv key bits set: 130/256
debug2: bits set: 509/1024
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: RSA 21:f7:7a:59:f5:ef:03:1f:ee:99:23:b8:f1:c1:71:b4
debug3: load_hostkeys: loading entries for host "clementine.duckdns.org" from file "/exports/home/se394/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /exports/home/se394/.ssh/known_hosts:3
debug3: load_hostkeys: loaded 1 keys
debug3: load_hostkeys: loading entries for host "162.211.160.162" from file "/exports/home/se394/.ssh/known_hosts"
debug3: load_hostkeys: found key type RSA in file /exports/home/se394/.ssh/known_hosts:3
debug3: load_hostkeys: loaded 1 keys
debug1: Host 'clementine.duckdns.org' is known and matches the RSA host key.
debug1: Found key in /exports/home/se394/.ssh/known_hosts:3
debug2: bits set: 496/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /exports/home/se394/.ssh/id_rsa (0x7f052168bf10),
debug2: key: /exports/home/se394/.ssh/id_dsa ((nil)),
debug2: key: /exports/home/se394/.ssh/id_ecdsa ((nil)),
debug1: Authentications that can continue: password
debug3: start over, passed a different list password
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup password
debug3: remaining preferred: ,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
[email protected]'s password:

Я проверил файл authorized_keys на сервере, и ключ соответствует id_rsa.pub. Есть ли у кого-нибудь подсказки, как действовать дальше?

решение1

Вам не следовало переименовывать файл закрытого ключа ( id_rsa), не настроив его так ssh, чтобы он знал, какие еще имена файлов следует искать при поиске закрытых ключей.

Связанный контент