SSH Environment

Andrew DeFaria Andrew@DeFaria.com
Wed Sep 29 16:09:00 GMT 2004


David E. Meier wrote:

> Hi,
>
> I try the running ssh client with only the required dll's from a .net 
> application and without a full cygwin installation. Basically that 
> works fine.
>
> However, I have a problem regarding the known_hosts file: It does not 
> get written anywhere and therefore asks to add the key each time the 
> app runs. I tried to set the environment variabe to: HOME=c:\Program 
> Files\myApp in WinXP with a subdir .ssh already created. No luck.
>
> Then I tried setting the HOME-variable to different values when 
> starting the ssh-process from my .net application using 
> "/cygdrive/c/Program Files/myApp", "/cygdrive/c/Program\\ Files/myApp" 
> or "C:\Program Files\myApp". No luck as well.
>
> What am I missing here? Do I need more environment variables? Another 
> solution for setting the path of the known_hosts file?

Why would a home directory be under "Program Files"?!? "Program Files" 
is a directory that contains a space in it so you might try escaping it. 
Well further reading of this thread suggests that OpenSSH uses the home 
directory in /etc/passwd anyway but still are ya gonna put 
/cygdrive/c/Program Files/myApp in that field? I think you'll still have 
a problem with the space.

I don't think you want a home directory under program files in the first 
place.

However, one trick that I do to more easily deal with the "Program 
Files" think is:

$ mount -bsf "/cydrive/c/Program Files" /apps

Then it's simply /apps/<application>/<etc>. Much easier to deal with, 
shorter and file name completion under bash works well with this.
-- 
Never raise your hands to your kids. It leaves your groin unprotected.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list