File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes General Computing and the fly likes Problem with Cygwin and Windows XP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Problem with Cygwin and Windows XP" Watch "Problem with Cygwin and Windows XP" New topic
Author

Problem with Cygwin and Windows XP

jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
Ok, I must admit I'm getting into new territory here, but here goes...
I'm running Windows XP Professional at home. I know, boo. Anyway, I also have installed the full Cygwin package, which includes OpenSSH.
I'm trying to connect to a development server which is running Linux, some SuSE version, but don't think that is an issue. I can connect fine, however I get the following error everytime I start (it does this if running ssh from a DOS window or from within the bash shell)
Could not create directory '/home/jabbaj/.ssh'
My HOME env variable is set for D:\SSH. Cygwin reads this fine. I set the permissions on this folder so that Everyone, including System, has full control. The bash process is running under my user id, and since I'm the owner of the directory, I don't think permissions are an issue, either. I can successfully create folders when I'm in a shell, it is just when I start up ssh that I get that message.
I even created the .ssh folder, didn't work. I went through the whole ssh-keygen stuff, putting my identity and id_rsa files in the correct locations, still no good, no automatic login. Even went so far as manually creating a known_hosts file, still
Anyone ever seen/experienced this before? My ultimate goal is to have it so I don't have to keep on entering passwords each time I do some sort of CVS operation, eventually so I can use WinCVS. As it stands, I'm doing everything server-side. But hey, at least I'm learning the commands...
Thanks
Jason
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
The message says:
Could not create directory '/home/jabbaj/.ssh'

Then I would say set your HOME to /home/jabbaj
-Barry
PS I think...
[ January 29, 2003: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
Cygwin reads HOME so that it knows where you are starting from on the local filesystem. Since this isn't a UNIX box, /home/jabbaj/ isn't a valid path. To Cygwin, /home/jabbaj/ equates to D:\SSH on the local file system. It's not a variable you set within in Cygwin, it's a variable that you set on the system that Cygwin reads.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Hi jason,
When I do echo $HOME I get /home/barry and that is what's in /etc/passwd.
This is Cygwin on Windows 2000. In my $HOME directory I have a .ssh directory. I have no problems doing ssh to my systems at work over a
VPM connection.
-Barry
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
Hmm, I haven't checked that out, I will when I get home (not running it at work, they would consider that "bad").
Don't really think it is a Cygwin issue, though I may be wrong. Since I get the same sort of error when running ssh from a DOS command prompt, makes me think the issue is probably more with the OpenSSH client instead.
I know that when I did echo $HOME, I would get /cygwin/d/SSH, maybe that is an issue, who knows. I just can't for the life of me get the lazy login for ssh to work.
Thanks for the suggestion, I'll do some more digging tonight and see what I come up with.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9053
    
  12
It seems that cygwin root is the subdir where cygwin is installed (eg. C:\cgwin). From memory I think the subdir marilyn was in C:\cygwin\user\marilyn, but I may be wrong. At any rate, it seems that you need to find the directory that has your (login) name and treat that as your home dir.
(later)Now that I'm home I see that it is actually C:\cygwin\home\Marilyn
[ January 30, 2003: Message edited by: Marilyn de Queiroz ]

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
I also just checked my Win 2000 environment variables (outside of cygwin). There is no HOME environment variable defined, so Cygwin does it all.
The "physical" location of my $HOME directory is e:\cygwin\home\barry, similar to what Marilyn suggested.
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
Wow, that's completely different from what I have setup, and I basically structured everything based on documentation I found on the web.
I'll give it a shot, thanks for the help.
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
You two rock!
I removed the HOME variable, logged into the dev server using ssh, didn't get that goofy error again. Ran through the ssh-keygen stuff, and other than having to change the permission on the id_rsa file to 600 (might be more restrictive than needed, but I figured what the hay), it works great. Even checked out a few modules with WinCVS, no problems.
Thanks a bunches!
Jason
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Cygwin and Windows XP