2

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
Geoffrey
  • 165
  • 1
  • 2
  • 10
  • Is the service running? Is the service running under your user-account on the server? – Tord Holmqvist Dec 08 '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. – Geoffrey Dec 08 '11 at 10:14

5 Answers5

5

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.

pcdev
  • 213
  • 1
  • 4
  • 12
  • Thanks a lot! This fixed my issue. Now freeSSHd runs on startup and without the system tray icon. – ReadySquid Sep 01 '14 at 02:40
  • This worked for me. Alternately, running the frontend GUI `FreeSSHDService.exe` as administrator as suggested by @guidex in [their answer](https://serverfault.com/a/938447) also worked, and the changes reflected in the correct `FreeSSHDService.ini` file in `C:\Program Files (x86)\freeSSHd` – ManSamVampire Feb 12 '22 at 08:01
1

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.

Mattijs
  • 111
  • 1
  • 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 08:42
1

Right click the freesshd configuration tool, and choose 'Run as administrator' also checkbox the 'Allow service to interact with desktop' in the services

guideX
  • 11
  • 1
  • Simply running the GUI configuration tool as administrator worked for me. `Allow service to interact with desktop` was not needed, but I had to stop the service while changing configuration. – ManSamVampire Feb 12 '22 at 08:03
0

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.

Geoffrey
  • 165
  • 1
  • 2
  • 10
0

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

KDR
  • 1