EDITAR: Se cambió el nombre de las claves ssh a id_rsa, todavía tengo problemas.

EDITAR: Se cambió el nombre de las claves ssh a id_rsa, todavía tengo problemas.

Intenté configurar claves públicas y privadas en dos computadoras (clementine y cfmi) para poder realizar ssh entre ellas sin usar una contraseña. Sin embargo, todavía me solicitan una contraseña a pesar de haber incluido la clave pública en el archivo de claves autorizadas en ~/.ssh.

Puedo iniciar sesión en el servidor cfmi cuando intento conectarme desde clementine, sin embargo, se me solicita mi contraseña.

También puede ser relevante que primero debo conectarme a una red VPN usando Cisco AnyConnect y solo entonces puedo acceder a cfmi ya que tiene un firewall.

Sin embargo, cuando intento conectarme desde el servidor cfmi a clementine, se me solicita una contraseña.eso no coincide con la contraseña de rootTengo en esa computadora. Por lo tanto, no puedo iniciar sesión desde cfmi a clementine.

Se vuelve aún más misterioso... La contraseña de root funciona bien cuando estoy haciendo ssh desde mi iPhone en la red local.

¿Alguien puede ayudarme a descubrir cómo hacer que funcionen las claves y cómo restablecer mi contraseña para acceder a Clementine por ssh?

EDITAR: Se cambió el nombre de las claves ssh a id_rsa, todavía tengo problemas.

Aquí está el contenido de .ssh en el cliente (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~

Y aquí está el resultado detallado para la conexión de cfmi a 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:

Revisé el archivo autorizado_keys en el servidor y la clave coincide con id_rsa.pub. ¿Alguien tiene alguna pista sobre cómo proceder desde aquí?

Respuesta1

No debería haber cambiado el nombre de su archivo de clave privada ( id_rsa) sin configurarlo sshpara saber qué otros nombres de archivo debería buscar al buscar claves privadas.

información relacionada