To set up a new OpenSSH user on Windows Server 2003, follow these steps:
- Make sure there is a user account on the Win2003 server. Also make sure that the user account logged in at least once, so that the home directory has been created.
- Create a folder named '.ssh' in the home directory of the new user (C:\Documents and Settings\Username).
- Use PuTTYgen to create a new private and public key on your local machine (type SSH-2 DSA). Save the private key as a .ppk file and copy-paste the public key into a new .txt file.
- The public key has to be copied into the new .ssh folder in the user's home directory on the Win2003 server.
- Create another copy of the file, named 'authorized_keys' (no extension) in the same .ssh directory.
- Remove the 'group' and 'passwd' file from the C:\Program Files\OpenSSH\etc folder
- On the Win2003 server, go to the command prompt and change the directory to C:\Program Files\OpenSSH\bin
- Now, type the following commands:
mkgroup -l >> ..\etc\groupmkpasswd -l >> ..\etc\passwd - Open the passwd file with notepad/wordpad and replace all instances of '/home/' with '\documents and settings\'. Then save the file.
- Restart the OpenSSH service and check for a successful WinSCP connection.