Próbuję zbudować serwer git repo ze zdalnym systemem Windows. Oto mój serwer ssh i środowisko budowania lokalnego klienta:
Serwer env
1. Windows os
2. zainstalowany mysysgit
3. zainstalowany copssh
4.
klient zdalnego serwera w chmurze
1. centOS 7 na vmware
2. lokalny komputer
Oto moje już podjęte działania.
1. wygeneruj parę kluczy publiczny-prywatny ssh-keygen -t rsa
na moim kliencie centos
2. dodaj użytkownika git o nazwie svccopssh na moim zdalnym serwerze Windows
3. skopiuj moje centos ~/.ssh/id_rsa.pub
do folderu serwera d:/Users/svccopssh/.ssh
, w którym copssh czyta klucz publiczny ssh i zmień jego nazwę jako authorized_keys
4. Uruchom test:
ssh -vT svccopssh@remoteIP
Wynik wygląda następująco:
[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).
Jakieś sugestie ? Jestem pewien, że ten sam klucz publiczny działa dobrze na kluczu github ssh
ssh -vvvT svccopssh@remoteIP
? Więcej-v
= więcej gadatliwy. Spróbuj także sprawdzić dzienniki serwera. Możesz zobaczyć problem zauthorized_keys
plikiem (problem z uprawnieniami lub podobny).