Estou configurando nosso novo servidor RHEL 7 e estou realmente empenhado em tentar que ele aceite meu par de chaves privado / público.
Tudo parece bastante semelhante em comparação com a configuração do sshd do servidor antigo.
Atual sshd_config
:
Port 22
Protocol 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
KeyRegenerationInterval 3600
ServerKeyBits 1024
SyslogFacility AUTHPRIV
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication yes
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials yes
UsePAM yes
X11Forwarding yes
UsePrivilegeSeparation sandbox
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
Subsystem sftp /usr/libexec/openssh/sftp-server
Efetuando login usando o PuTTY, recebo:
Using username "jweinraub".
Server refused our key
Minhas permissões são
drwx------. jweinraub jweinraub unconfined_u:object_r:ssh_home_t:s0 .ssh/
-rw-------. jweinraub jweinraub unconfined_u:object_r:ssh_home_t:s0 authorized_keys
E com depuração 3
debug1: trying public key file /home/jweinraub/.ssh/authorized_keys
debug1: fd 4 clearing O_NONBLOCK
debug2: key not found
debug1: restore_uid: 0/0
debug3: mm_answer_keyallowed: key 0x7ff339f8afa0 is not allowed
Failed publickey for jweinraub from 10.18.66.11 port 55147 ssh2: RSA 1c:9d:1c:c7:cf:14:48:56:4f:23:5d:cb:16:a6:1d:18
debug3: mm_request_send entering: type 23
debug2: userauth_pubkey: authenticated 0 pkalg ssh-rsa [preauth]
debug3: userauth_finish: failure partial=0 next methods="publickey,password" [preauth]
Tags ssh putty key-authentication