So, long story short, I accidentally sysprepped my dev server not the vm I was working on (I know, too many rdp windows open and sleep deprived due to new baby).
The dev server works ok, I changed the machine name back to what it was and reassigned the old ip address. Everything else on the server seems to work but I can't connect to git anymore remotely. I assume it is gitolite or ssh related.
git clone gives me: Connection closed by 192.168.10.20 fatal: The remote end hung up unexpectedly
This is what I get from ssh -v
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to myserver [<serveripaddress>] port 22.
debug1: Connection established.
debug1: identity file /c/Users/me/.ssh/identity type -1
debug1: identity file /c/Users/me/.ssh/id_rsa type 1
debug1: identity file /c/Users/me/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8
debug1: match: OpenSSH_5.8 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc 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: Host 'myserver' is known and matches the RSA host key.
debug1: Found key in /c/Users/me/.ssh/known_hosts:3
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,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/me/.ssh/identity
debug1: Offering public key: /c/Users/me/.ssh/id_rsa
Connection closed by <serveripaddress>
Any ideas how to fix this greatly appreciated.
A bit like in "Re: sshd: PID xxxx: fatal: initgroups: myid: Invalid argument.", the issue lies in /etc/passwd
and /etc/group
having the wrong SID for the user (here 'git
')
The OP Ian1971 comments:
The problem was that sysprep creates new machine ids so all my local Windows sids were wrong in
/etc/passwd
and/etc/group
.