cygWin connect by SSH using RSA key; ssh.exe couldn't create /home/user/.ssh
Hello,
I'm using Win XP and I'm trying to connect by SSH to remote host using RSA key.
I've investigated that cygWin recognizes Documents and Settings dir as home directory
Z:\app\cwRsync\bin>cygpath -H
/cygdrive/c/Documents and Settings
I've created .ssh directory in Documents and Settings/user/.ssh and moved known_hosts, id_rsa, id_rsa.pub there.
Now, I'm trying to connect via ssh.exe to remote host
Z:\app\cwRsync\bin>ssh -p 22 myuser@remotehost.com
Could not create directory '/home/user/.ssh'.
The authenticity of host '[remotehost.com]:22 ([remotehost.com]:22)' can't be established.
RSA key fingerprint is f7:f4:2c:e0:c6:7e:d2:a4:45:70:63:df:bf:f2:84:46.
Are you sure you want to continue connecting (yes/no)?
What I'm doing wrong? Why ssh.exe couldn't create directory /home/user/.ssh?
Thank you.
It can't create it because it's already been created. I'd suspect a permissions issue. What are the permissions on ~, ~/.ssh and the files within ~/.ssh?
Try changing the permissions on .ssh to 700. This is because .ssh is a sensitive directory where private keys are stored.
Another thing to try would be ln -s /cygdrive/c/Documents\ and\ Settings /home, thus causing searches in /home to be redirected to Documents and Settings.
In your Documents and Settings folder of your local machine, create the folder home\<user>. For some reason, cwRsync won't create these folders for you. I didn't change my cygpath, so I created mine in C:\Program Files\cwRsync\home\<user>.
