Eu estou tentando construir um servidor de repositório git com um controle remoto do windows. Aqui está o meu servidor ssh e o ambiente local de construção do cliente:
env do servidor
1. windows os
2. mysysgit instalado
3. copssh instalado
4.
cliente do servidor de nuvem remota
1. centOS 7 no vmware
2. pc local
Aqui estão as minhas ações já tomadas.
1. gerar um par de chaves pública-privada com ssh-keygen -t rsa
no meu cliente centos
2. adicionar um usuário git chamado svccopssh no meu servidor windows remoto
3. copiar meu centos ~/.ssh/id_rsa.pub
para a pasta do servidor d:/Users/svccopssh/.ssh
, em que copssh lê public-ssh-key, e renomeá-lo como authorized_keys
4. teste de execução:
ssh -vT svccopssh@remoteIP
O resultado é assim:
[is_january@localhost .ssh]$ ssh -vT svccopssh@120.76.123.231
OpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 56: Applying options for *
debug1: Connecting to 120.76.123.231 [120.76.123.231] port 22.
debug1: Connection established.
debug1: identity file /home/is_january/.ssh/id_rsa type 1
debug1: identity file /home/is_january/.ssh/id_rsa-cert type -1
debug1: identity file /home/is_january/.ssh/id_dsa type -1
debug1: identity file /home/is_january/.ssh/id_dsa-cert type -1
debug1: identity file /home/is_january/.ssh/id_ecdsa type -1
debug1: identity file /home/is_january/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/is_january/.ssh/id_ed25519 type -1
debug1: identity file /home/is_january/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.1
debug1: match: OpenSSH_7.1 pat OpenSSH* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-sha1-etm@openssh.com none
debug1: kex: curve25519-sha256@libssh.org need=20 dh_need=20
debug1: kex: curve25519-sha256@libssh.org need=20 dh_need=20
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDS 26:95:35:2c:32:ad:46:14:94:5e:71:95:b7:f7:2d:aa
debug1: Host '120.76.123.231' is known and matches the ECDSA host key.
debug1: Found key in /home/is_january/.ssh/known_hosts:1
debug1: ssh_ecdsa_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,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/is_january/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /home/is_january/.ssh/id_dsa
debug1: Trying private key: /home/is_january/.ssh/id_ecdsa
debug1: Trying private key: /home/is_january/.ssh/id_ed25519
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).
Alguma sugestão ? Tenho certeza de que a mesma chave pública funciona bem no github ssh-key
ssh -vvvT svccopssh@remoteIP
? Mais-v
= mais detalhado. Além disso, tente verificar os logs do servidor. Você pode ver um problema com oauthorized_keys
arquivo (problema de permissão ou similar).