Eu tentei configurar a autenticação do PubKey entre meu servidor de dedi do Mac e do CentOS, mas algo está acontecendo ...
Aqui estão os passos que eu dei:
ssh-keygen -t rsa
Então
chmod 700 .ssh/ && chmod 600 .ssh/*
Então
scp id_rsa.pub root@dedi:~/.ssh/authorized_keys
Então (desculpe por todos esses "Então")
ssh root@dedi
E o que você sabe? Eu sou solicitado pela minha senha.
Alguma ideia? Obrigado!
EDITAR : Aqui está a saída de ssh -v root@dedi
:
SH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for dedi
debug1: Connecting to dediserversdomain.com.au.co.net.org.bz [198.100.145.168] port 22.
debug1: Connection established.
debug1: identity file /Users/someone/.ssh/id_rsa,~/.ssh/id_dsa type -1
debug1: identity file /Users/someone/.ssh/id_rsa,~/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3
debug1: match: OpenSSH_5.3 pat OpenSSH_5*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA (my rsa key)
debug1: Host 'dediserversdomain.com.au.co.net.org.bz' is known and matches the RSA host key.
debug1: Found key in /Users/someone/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/someone/.ssh/id_rsa,~/.ssh/id_dsa
debug1: Next authentication method: password
[email protected]'s password:
EDITAR : saída de stat .ssh
e stat .ssh/*
de dentro da minha dedi:
File: '.ssh'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 1175048 Links: 2
Access: (0700/drwx------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2014-09-21 11:21:43.000000000 -0400
Modify: 2014-09-21 10:52:26.000000000 -0400
Change: 2014-09-21 11:21:49.000000000 -0400
File: '.ssh/authorized_keys'
Size: 411 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 1175045 Links: 1
Access: (0600/-rw-------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2014-09-21 10:52:26.000000000 -0400
Modify: 2014-09-21 10:52:26.000000000 -0400
Change: 2014-09-21 11:21:43.000000000 -0400
EDIT : Aqui está a saída de /usr/sbin/sshd -d
debug1: sshd version OpenSSH_5.3p1
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
Set /proc/self/oom_score_adj from 0 to -1000
debug1: Bind to port 22 on 0.0.0.0.
Bind to port 22 on 0.0.0.0 failed: Address already in use.
debug1: Bind to port 22 on ::.
Bind to port 22 on :: failed: Address already in use.
Cannot bind any address.
EDIT : Aqui está a saída de grep 'sshd' /var/log/*
:
Arquivo binário / var / log / btmp corresponde
Arquivo binário / var / log / btmp-20140901 jogos
/var/log/dovecot-info.log:Aug 08 09:10:03 pop3-login: Info: Desconectado (auth falhou, 1 tentativas): user =, method = PLAIN, rip = 211.43.207.112, lip = 198.100. 145,168
/var/log/install_rtm.log:rtm hINFO_TCP_LISTEN_IP-0-0-0-0_PORT-22_procname | sshd
/var/log/install_rtm.log:rtm hINFO_TCP_LISTEN_IP-0-0-0-0_PORT-22_cmdline | / usr / sbin / sshd
/var/log/install_rtm.log:rtm hINFO_TCP_LISTEN_IP-0-0-0-0_PORT-22_exe | / usr / sbin / sshd
/var/log/install_rtm.log:rtm hINFO_TCP_LISTEN_IP-0_PORT-22_procname | sshd
/var/log/install_rtm.log:rtm hINFO_TCP_LISTEN_IP-0_PORT-22_cmdline | / usr / sbin / sshd
/var/log/install_rtm.log:rtm hINFO_TCP_LISTEN_IP-0_PORT-22_exe | / usr / sbin / sshd