# Cygwin cannot create .ssh

I'm having some trouble using Git with cygwin.

"Could not create directory '/home/Craig/.ssh'. The authenticity of host 'github.com (207.97.227.239)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? no Host key verification failed. fatal: The remote end hung up unexpectedly"

is being displayed whilst trying to connect to github using SSH. I've also tried using https:// as the remote path but to no success.

I'm running windows 7.

-
This might need to be moved to superuser. –  VoronoiPotato Dec 10 '12 at 13:14
" Are you sure you want to continue connecting (yes/no)? no Host key verification failed" There's a surprise. –  barlop Dec 11 '12 at 0:26
I have typed yes, the no was just to get an example error message. (hint: it's the same one.) –  Craig Cuthbertson Dec 12 '12 at 12:08

## migrated from stackoverflow.comDec 11 '12 at 0:23

This question came from our site for professional and enthusiast programmers.

This worked for me! FROM: http://ekawas.blogspot.co.uk/2007/03/solving-pesky-ssh-issues-in-cygwin.html

" First locate the file called 'passwd' in your C:\path\to\cygwin\etc directory and open it with wordpad.

Second, replace the text /home/YOUR_NAME with /cygdrive/c/Documents and Settings/YOUR_NAME

"

Cygwin on Windows7

-

Use Sysinternals Process Monitor to log the file system accesses that take place when you are trying to do this.

-

Try typing yes when you are asked if you want to continue

-
I have done so. The 'no' was to reproduce the error message to post on here. –  Craig Cuthbertson Dec 12 '12 at 12:08

maybe the permissions to your home directory are interfering with ssh's ability to create the known_hosts file?

go to your home directory and create a folder called .ssh, and a blank file called known_hosts inside of it. then set the permissions on the file to 644.

cd ~
mkdir .ssh
touch ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts


then try ssh again and see if the result is any different. (note: you'll have to say yes when asked if you want to continue connecting the first time. then that server will be added to the known_hosts list and you shouldn't be prompted anymore after that.)

-
.ssh already exists in my home directory, I have created and chmod'd the known_hosts file, but to no positive effect. My home dir is currently set as /cygdrive/c/Users/Craig, could this be the problem? –  Craig Cuthbertson Dec 12 '12 at 12:03