Bill
Bill

Reputation: 11

Cygwin home directory on target system inconsistent

I am having difficulty connecting to a remote Windows system running cygwin. When I connect from a linux box to cygwin, it connects fine and "sees" the remote home directory as /home/userID When I connect from Windows cygwin to the remote windows cygwin, it sees the home directory as /cygdrive/c/Documents and Settings/UserID Finally, when I am logged onto the remote Windows machine (the one with the problem) home is /home/UseID but the value for cygpath -H is $ echo $(cygpath -H) /cygdrive/c/Documents and Settings

This seems to be causing my connection problem from windows to windows and no problem from linux to windows

Any ideas how to fix it?

Upvotes: 1

Views: 367

Answers (1)

Costa
Costa

Reputation: 2043

Since you have the correct path in /etc/passwd, one possibility is that perhaps the SSH client you are using from your Windows systems is sending custom environment values.

If you're using PuTTY, before connecting, look in the tree panel on the left hand side of the dialog. There should be an entry called Connection and a sub-entry called Data which will bring you to an option screen that has a section called Environment variables. Check if the HOME var is being overridden there and if so, remove it.

If you're using a different SSH client, check its configuration to see if its using the SendEnv option. More info on that here: http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config.

Or you could try blocking off custom environments on the destination/server side by disabling AcceptEnv in the SSHd configuration on the system you're connecting to. More info on that here: http://www.openbsd.org/cgi-bin/man.cgi?query=sshd_config.

Hope this helps.

Upvotes: 0

Related Questions