Could not create directory '/home/ME/.ssh'.Once I enter 'yes', I get the following:
The authenticity of host 'xxx.yyy.zzz.ca (1xx.82.67.xx)' can't be established.
RSA key fingerprint is 6c:59:15:64:ed:c8:67:35:d6:ed:1c:a2:ee:87:2b:3f.
Are you sure you want to continue connecting (yes/no)?
Failed to add the host to the list of known hosts (/home/ME/.ssh/known_hosts).
So that message occurs every single time that I attempt to login to the remote machine.
So the question is, how do I solve this problem? The solution was actually quite simple!
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
Finally, save the file.
In hindsight, the solution is very straightforward, but it took me hours to finally figure out. Hopefully, I can save your time!
11 comments:
THANK YOU! you saved me a lot of time. I also didn't know where to put my .ssh keys (the problem is related, because they go in the same directory). You solved both my problems at once.
also (less enlightening but more strait forward), run this command as suggested inside the man page of mkpasswd :
mkpasswd -l -p "$(cygpath -H)" > /etc/passwd
just to add my two cents,
Its actually the text "/cygdrive/.." its not the drive where cygwin is installed etc. Just enter it verbatim.
Also be careful with capital letters. Us windows users get lazy about that.
For vista and win7, its /cygdrive/c/users/your_name
Alternatively, if you're like me and don't use the /home directory at all, you can make a symlink to it:
ln -s ~ /home
(note that you'll have to delete your /home to do this, and set ~ to be /cygdrive/c/Users)
The far easier method that i never see people use is to run the sync from windows in a batch file and set the HOME variable to the folder that i want the ssh file created eg:
HOME=./
Which stick the .ssh folder and .unison folder in the folder at time of script run :)
EASY PEEEZEEE
Cheers for this - worked perfectly.
Thank you so much!! I have spent long hours and finally I got it working thanks to you.
Thank you very much. This solution was quick to implement.
Joy! actual joy cascaded through me when I found your solution. It's the small things that drive me nuts...
I overcame the inability to achieve what you (and I) were trying to do by using the -o and -i options, however I was still informed that "Cannot create directory /home/Adam/.ssh". However, doing this COMPLETELY removes the need for those options and the annoying error message. Yay!
I just added the Environment variable:
HOME=D:\Documents and settings\[my_user]\
This worked perfectly.
Post a Comment