Acesso ao servidor do CentOS 5 através de SSH com chave pública / privada RSA da OSX

1

Estou tentando configurar o acesso SSH ao meu servidor CentOS usando uma chave RSA em vez de uma senha, mas ela se recusa a aceitar a chave. Aqui está o que eu fiz até agora:

Na máquina do cliente (OSX):

ssh-keygen -b 4096 -C "[email protected]" -t rsa
// no passphrase

No servidor (CentOS 5):

cat id_rsa.pub >> ~/.ssh/authorized_keys2
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
chmod go-w ~/

// Added to /etc/ssh/sshd_config:
RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile  .ssh/authorized_keys2

// and finally restart sshd
/sbin/service sshd restart

De volta ao cliente tentando se conectar:

ssh [email protected] -v

debug1: Found key in /Users/jwood/.ssh/known_hosts:16
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/jwood/.ssh/identity
debug1: Offering public key: /Users/jwood/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Offering public key: /Users/jwood/.ssh/id_dsa
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: password
[email protected]'s password:

Como você pode ver, ele tenta usar a chave pública e falha na senha. O que poderia estar errado com a configuração para causar isso?

Obrigado J

    
por JWood 20.07.2011 / 13:57

1 resposta

1

verifique se o arquivo authorized_keys2 é uma linha por chave

    
por 20.07.2011 / 14:55