Tuesday, August 25, 2015

Add a bit unix functional to windows server

Problem.


I have server with windows. I worked with this server through RDP. And sometime GUI subsystem stop to work correctly, but logs of my service showed that everything other worked fine - processes, services. So, I've needed an not-GUI mechanism to work with this server.



Action.


1) Install freesshd
    If it asks something like "should I generate the keys?" - answer 'yes'
    If it asks something like "install the service?" - answer 'yes'
2) Run freesshd as administrator
3) Add user&pass (password stored as sha1_hash), set tick 'shell' - it gives your user access to ssh
4) Go to 'control panel -> windows firewall -> advanced' and allow access from outside to 22 port
5) Exit from your gui instance of freesshd
6) install gnuwin327) add c:\gnuwin32 to system PATH (not default user PATH)
8) install midnight commander for Windows
9) add dir with installed mc.exe to system PATH (not default user PATH)
10) Restart service freesshd ('control panel -> administrative tools -> services')

So. Now you can connect to your windows server via ssh (for example, in Putty), use in shell comfortable gnu utils & midnight commander. If midnight commander looks bad, try to run it 'mc -ac'.