Posted: 2004-11-01 08:57
OK, this is not a WinSCP support question, indeed it is not a support question at all
While fiddlig around, I found myself in need of some non-standard use, I couldn't find any answers; so I sat down and did my own work.
Also, I was not able to locate anyone doing an OpenSSH for Windows FAQ, so at the moment the best place seemd to send it to WinSCP forum.
After some editing, you may like to add it to the FAQ,
Maybe some other folk need them, so here they are:
Q: How do I login as <virtual_user> into Windows machine without having to create a user called <virtual_user>.
You must already have created a 'passwd' as below
Now, open 'passwd' file in notepad.exe (or your favorite text editor), you should see a number of lines which are the users in your domain/workgroup and your local machine.
It looks something like these:
Where <windows_user_n> represents your real users, and the capital letters represent the stuff that Windows need.
If you do not want <windows_user_x> logging in, you need to delete the corresponding <windows_user_x> line in 'passwd' file.
In my case, I wanted to login from Linux as 'root' with 'Administrator' rights on the Windows machine.
To do this, I duplicated the line that began with 'Administrator' and replace 'Administrator' with 'root' for that line, so that they looked something like below.
In this case, anyone logging in as 'root' will have have the same access rights as 'Administrator'. You may want to use some other user name as template for 'root'.
In any case, the general thing applies: You use a Windows user line as a template and create a virtual user for OpenSSH.
Q: How do I login and start from an arbitrary path (say C:\), instead of Windows's homepath.
In Registry.exe, you need to create a couple of keys and string values, such as these:
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/openssh_home
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/openssh_home
BTW, I did not check whether the forward slash was necessary in '/openssh_home', I just followed CygWin/OpenSSH conventions.
Then, you need to create a String Value with label 'native' and the string value is the full qualified path --in my case, it was simply 'C:\'.
You may need to omit the backslash (from 'C:\') if you need to add further sub directories.
One final point: OpenSSH service is quite sensitive to how many 'cygwin1.dll's you have in your system. If it finds more than one, it will refuse to stop and emit a cryptic message. You can find out what has gone wrong if you look into this file
Once you have satisfied those, OpenSSH should work.
You can post new topics in this forum
And it's free!