Apps optimize

Set up a free SSH server on Windows 7 with freeSSHd

freeSSHd is a handy little application. Learn how to use freeSSHd to get an SSH server up and running on a Windows 7 machine.

There are many ways to remote in to a machine--some of them are secure, some of them are not. For the old school administrators, you can't beat secure shell for security. Unfortunately, the Windows platform doesn't include either a secure shell client or server. In order to connect to a machine via SSH (default port 22), the secure shell daemon must be present on the machine in question.

Thanks to the freeSSHd application, it is possible to set up a secure shell and secure ftp server on a Windows XP/Vista/7/Server machine and even have a handy GUI tool for the configuration of both services. Let's walk through the steps of getting an SSH server up and running on your Windows 7 machine.

What you'll need

I included the admin access requirement in case there is an issue with your network passing port 22 through. If this happens, you will need to set up a rule to allow (or pass) the default SSH port into the target machine. If you cannot, you can always change to a non-standard port that you know is open.

Installing freeSSHd

Download and double-click the installation file. The installation is fairly straightforward except for these points:

  • Private keys should be generated (you will be prompted during the installation), and
  • Do not start freeSSHd as a system service (this will cause problems with the configuration and can cause security issues).

Once you follow all the steps in the wizard, freeSSHd will be installed.

Using freeSSHd

Since we're not running this as a system service, we have to start it manually by double-clicking the freeSSHd desktop icon. It will seem like nothing happened, but you should see a new icon in the system tray (Figure A). Figure A

The freeSSHd is in the bottom right corner.
Right click the system tray icon and select Settings. You should see a green check next to the SSH server and a red X next to the Telnet server (Figure B). That is exactly how it should look. Figure B

If you see a red X next to the SSH server, click the link labeled Click Here To Start It. (Click the image to enlarge.)

Your SSH server should be running now, but you have no means of authenticating a user. freeSSHd doesn't need (nor should have) access to your Active Directory information, so you'll want to set up a user who can access the machine. To do this, follow these steps:

  1. Open the freeSSHd settings window.
  2. Click the Users tab.
  3. Click the Add button.
  4. Fill out the necessary information in the User Properties dialog (Figure C) and click OK. You should be able to connect to your Windows machine using secure shell now.

Figure C

Be sure to enable the features to be allowed by the user. (Click the image to enlarge.)

So what can you do with this application? One nice feature of freeSSHd is the ability to use the scp command (secure copy); this allows you to securely move files to and from a machine. The scp command structure looks like this: scp filename:username@ADDRESS_TO_DESTINATION:filename (username is the username on the machine the file is to be copied to, ADDRESS_TO_DESTINATION is the IP address of the machine the file is to be copied to, and the filename is the name of the file to be copied).

Let's say you want to copy test.odt to jlwallen on a machine with an address of 192.168.100.74 (that machine will need to have a form of the secure shell daemon running as well). Here's how to execute this successfully:

  1. Log in to your Windows machine via secure shell.
  2. Issue the command scp test.odt jlwallen@192.168.100.74:test.odt.
  3. Enter the remote user's password and let the file copy. If you go to the remote machine, you should see that file is in the user's home directory.

Conclusion

The ability to run a secure shell server on a Windows machine makes remote administration or use even easier than just adding a third-party solution such as LogMeIn or TeamViewer. When you don't need a full-blown GUI for remotes, you want to know you're getting in to your machine with at least a modicum of security--freeSSHd offers that in the true UNIX/Linux fashion. Slap this little beauty on one of your Windows machines, and see if it makes your life easier.

About

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website getjackd.net.

5 comments
nevelis
nevelis

I tried running this on win7 using git bash's sh for a shell.  Logging in via SSH gives you completely borked terminal output, and trying to `git pull` results in:

aaron@rainbowism:~/Grimoire$ git pull win-vm master

aaron@10.0.0.22's password:

fatal: protocol error: bad line length character: Unab

Unfortunate that it doesn't work and it looks like its had no love in over a year now.

hunter_az
hunter_az

Why not try cygwin with sshd? I have to admit its a little bit of a challenge, but some very good tutorial's exist. You also get lots of tools that can be quite useful.

dji
dji

Hi, These programs are discontinued imho. I had a look on the freeSSHd's site. The last version of the programs is from Jan. 2009 and the last post from Aug. 2010... We were recently looking for such a solution at my work. We choose SilverSHielD from a company called K2SXS (http://www.k2sxs.com/silvershield/) A free version is available but limited to 1 client at a time with 3 simultaneous connections. This was insufficient for our needs. We took the Pro version with a global license. The price was very good price for what we got. The SSH & SFTP servers are obviously with no limitations of any sort. But above all, we can install as many servers we want on any number of host we need. Which is heaven for a big organisation as mine In addition, they have a .great support. We were missing a functionnality. They made it for us in a very short time and even included it in the new version! Rgrds, Dji PS : I don't get a penny for my speech which could appear as advirtising but is not!! ;o)

jbaker.it
jbaker.it

Will this work on 64bit Windows 7?