C:\Program Files\ICW\bin\sshd.exe: *** fatal error – could not load user32, Win32 error 1114I’m using rsnapshot to do efficient file-based backups of disparate on & off-site servers to a big disk on a backup server here in the office. Up until this point all the machines involved have been running some form of Linux, but I spent today roping a Windows server we have hosted at The Planet into the mix. The files I’m concerned with are backup dumps produced by MS-SQL. In the past I used a Windows-friendly file-sync service to move the files, but I’d be happier if I could do everything from my Linux backup server.
The solution seemed obvious, get an ssh server and an rsync client working on windows so I could treat it like any other machine. I tried using copssh, which starts with openssh and adds just enough cygwin to get it running on Windows, and wraps it all up with some utility scripts in an easy-to-use installer. I ran into a few little hitches with passwordless public-key authentication, but after uninstalling and reinstalling, everything seemed to be working well. I was able to ssh in to the server without entering a password and run commands. Next step was to install rsync, I went with cwrsync, another cygwin-based port of the unix standard software.
Then the problem began, I tried running rsync from a Linux machine against the windows machine and it failed with the following error when I used a non-administrator account:
C:\Program Files\ICW\bin\sshd.exe: *** fatal error - could not load user32, Win32 error 1114
A little searching suggested I wasn’t the only one. If I sshed in to a shell and ran ‘whoami’ I saw that I was actually using the service account that had been created for sshd, rather than the account of the user I’d tried logging in as. More digging didn’t give me much hope. I found some tweaks to the cygwin environment used when starting the service, but that didn’t help.
So, I ended up giving up on copssh, uninstalled it and cwrsync and just installed cygwin, and used it to install openssh and rsync. Cygwin packages openssh with some scripts that take care of installing it as a service. I didn’t use these instructions, but they seem to give a good overview.
So, my advice, just use cygwin it was faster than the “shortcut” I tried.