Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

FreeSSHd is installed on Windows Server 2003, not on the C: drive but on another drive, D:. When I command-prompt to the D: drive and type in ssh, it tells me ssh is not recognised.

I added myself as a user to FreeSSHd with a hashed password and enabled SSH.

The Windows Firewall service is not running.

I can connect to the server using Remote Desktop Connection. I want to use ssh with Mercurial source code management system.

While I am logged onto the server via Remote Desktop connection, I can also connect to the server via ssh and putty on the client machine.

As soon as I log off from the server via Remote Desktop Connection, and I type in on the client:

ssh <username>@<server>

I get:

ssh: Connect to host <server> port 22: Connection refused
share|improve this question
Is the service running? Is the service running under your user-account on the server? – Tord Holmqvist Dec 8 '11 at 10:10
Hi @Tord, I realised that ssh server stops as soon as I log off from the server via Remote Desktop Connection. The solution is to not log off from the server. I just close the Remote Desktop Connection program on the client. – systemovich Dec 8 '11 at 10:14

Resurrecting an old thread, I know, but I have some new information. The answer is actually that the service and the front end appear to run independently, with their own ini file. The service runs as LocalSystem by default, but when you run the front end (on Windows 7 at least) it saves the settings in your profile directory tree, so the service never reads it.

Solution for me was to copy the FreeSSHDService.ini file from the following location over the top of the one in the Program Files folder:

C:\users\<my username>\AppData\Local\VirtualStore\Program Files (x86)\freeSSHd\

Restart the service and then you can log out. But as Mattijs has pointed out, it still seems to fall over occasionally, and the other downside is that each time you need to make a config change, you either have to manually edit the ini file or recopy it after editing via the UI. Too bad it's not supported any longer, it's still an immensely useful tool.

share|improve this answer
Thanks a lot! This fixed my issue. Now freeSSHd runs on startup and without the system tray icon. – ReadySquid Sep 1 '14 at 2:40
up vote 0 down vote accepted

The answer is to not log off from the server. That way, the ssh server will keep running. Just close the Remote Desktop Connection program on the client machine.

share|improve this answer

sorry, but that is ridiculous, having to keep the session open to not have service shut down.... I had the same issue and I was ablw to let the service run by starting it as administator from the command.

Do the following: Go to services console in administrator and stop the current freessshd service. Then open a CMD and run:

runas /user:<localmachinename>\administrator cmd

where \administrator can be replace by your admin user. I didnt need the localmachine name.

It will ask you for your password, and then it will open a new CMD. In this command you will start the freesshdservice with

net start <service name>

Close all screens and log off. Test is freesshd is still running.

Minor improvement would be to add autostart in your command line code, so that it will restart after server reboot. With current solution it will not, I guess.

share|improve this answer
I must add that this solution doesn't work on the long run. Freesshd stops after a while or I get an exception which kills the service.....lovely platform Windows. Time to move on to Linux where this stuff works natively – Mattijs Nov 25 '13 at 8:42

The FreeSSHD service needs to have the setting "Allow service to interact with desktop" enabled.

share|improve this answer
Could you elaborate/describe in more detail why that setting would be needed? – Castaglia Mar 22 at 5:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.