Minhas permissões são assim:
-rw-------. 1 smpadmin staff 400 May 21 2014 id_rsa.pub
-rw-r--r--. 1 smpadmin staff 505 Dec 14 19:19 known_hosts
drwxr-xr-x. 45 smpadmin staff 4096 Jan 20 09:53 ..
-rw-r--r--. 1 smpadmin staff 386 Jan 20 10:32 config
-rwx------. 1 smpadmin staff 400 Jan 20 10:34 authorized_keys
-rwx------. 1 smpadmin staff 400 Jan 20 10:37 authorized_keys2
drwx------. 2 smpadmin staff 4096 Jan 20 10:37 .
O log:
debug3: record_hostkey: found key type RSA in file /home/alejanpi/.ssh/known_hosts:85
debug3: load_hostkeys: loaded 1 keys from x.x.150.86
debug1: Host 'x.x.150.86' is known and matches the RSA host key.
debug1: Found key in /home/alejanpi/.ssh/known_hosts:85
debug2: bits set: 1525/3072
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: /home/alejanpi/.ssh/id_rsa (0x60005ff50),
debug2: key: /home/alejanpi/.ssh/id_dsa (0x0),
debug2: key: /home/alejanpi/.ssh/id_ecdsa (0x0),
debug2: key: /home/alejanpi/.ssh/id_ed25519 (0x0),
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/alejanpi/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Trying private key: /home/alejanpi/.ssh/id_dsa
debug3: no such identity: /home/alejanpi/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /home/alejanpi/.ssh/id_ecdsa
debug3: no such identity: /home/alejanpi/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/alejanpi/.ssh/id_ed25519
debug3: no such identity: /home/alejanpi/.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
[email protected]'s password:
Eu adicionei a chave pública aos dois arquivos de chaves autorizados.
Ao comparar com outro servidor no qual tenho as mesmas chaves em funcionamento, os logs deste mostram em algum momento:
Server accepts key: pkalg ssh-rsa blen 277
Eu também notei um código hexadecimal diferente nesta parte dos logs:
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/alejanpi/.ssh/id_rsa (0x60006c5f0),
Agora, para o servidor onde minhas chaves não estão funcionando, / home costumava estar em /, mas eu o montei em um disco diferente. As minhas teclas costumavam funcionar antes de me mudar / casa. Não tenho certeza se isso está me afetando, mas achei que valeria a pena mencionar. É assim que montei em casa:
UUID=143f3a8a-55f3-41e4-8797-d1cdb0435c13 /home ext4 defaults 0 2
Permissões do SELinux.
drwx------. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 .
drwxr-xr-x. smpadmin staff unconfined_u:object_r:user_home_dir_t:s0 ..
-rwx------. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 authorized_keys
-rwx------. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 authorized_keys2
-rw-r--r--. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 config
-rw-------. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 environment
-rw-------. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 id_rsa.pub
-rw-r--r--. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 known_hosts
O diretório inicial tem:
drwxr-xr-x. raiz raiz system_u: object_r: file_t: s0 home
Espero que vocês possam me ajudar.
Ty.