ssh/sftp for Windows 2008 Server using CopSSH
Somehow Microsoft missed the boat again. SSH/SFTP is still not included in Windows Server 2008. Only FTP is included with the same functionality that existed in 2003.
CopSSH allows us to add this much needed functionality to a Windows server, or workstation. These instructions assume you are familiar with vim.
On the server we will use:
Runas (built in) http://technet.microsoft.com/en-us/library/cc781769.aspx
gVim for Windows http://www.vim.org/download.php#pc
On the client to test:
1) Install gvim
2) Install CopSSH using all the defaults.
It will install to "c:\Program Files\copSSH\" There you will find an etc directory that should look familiar if your a BSD/linux user.
3) Open a command prompt (start run > cmd)
4) Use the runas command to launch gvim as an administrator.
runas /user:domain\username "c:\program files\vim\vim72\gvim.exe"
5) In gvim open the sshd_config file located in "c:\program files\copssh\etc"
6) uncomment and configure the following:
Save the file.
Openssh SSHD service ( start > run services.msc )
8) Configure the Windows Firewall to allow internal connections on port 22.
Right click on inbound rules, select new rule, Port, TCP, 22, Allow the connection, Domain Private and Public. Give it a proper name and description.
Now everything is setup to work, but you have no users configured. Users should be created locally on the server, and then activated using Start > Programs > COPSSH > Activate a user. This writes a line to the etc/passwd file. You can edit this using runas and gvim. If you want to give the user access to files that exist outside of the copssh folder, use /cygdrive/Drive letter/path . As an example the D:\webs folder would be written as /cygdrive/d/webs .
Make sure you grant the user NTFS permissions to the folder. Use NTFS permissions to permit or deny them movement around the file system.
You can test SSH using putty, and sftp using WinSCP.
|Print article||This entry was posted by Mikeal on 08/21/08 at 09:52:37 am . Follow any responses to this post through RSS 2.0.|