Skip to Content
SSH, The Secure Shell: The Definitive Guide, 2nd Edition
book

SSH, The Secure Shell: The Definitive Guide, 2nd Edition

by Daniel J. Barrett, Richard E. Silverman, Robert G. Byrnes
May 2005
Intermediate to advanced
666 pages
21h 5m
English
O'Reilly Media, Inc.
Book available
Content preview from SSH, The Secure Shell: The Definitive Guide, 2nd Edition

Setting Up the SSH Server

The SSH server, sshd, runs under Cygwin as a standard Windows service, called (not surprisingly) Cygwin SSH Service. Cygwin provides a script, called ssh-host-config, to set this up. Here’s what to do:

Warning

The Cygwin SSH Service (a.k.a. sshd) runs only on flavors of Windows that support services: NT, 2000, XP, 2003, etc.

  1. Make sure you’ve set up the path and environment variables for OpenSSH and Cygwin. [14.1]

  2. From an account with administrative privileges, run:

        C:\> ssh-host-config
  3. Answer yes to all questions.

  4. When ssh-host-config completes, your service should be ready to run. Open your Services control panel, look for Cygwin SSHD Service, and start the service. Alternatively, use the command line:

        C:\> net start sshd

    You might also want to set the service startup to Automatic, so it runs whenever you boot the computer. To stop the service, again use the Services control panel or type:

        C:\> net stop sshd

If the service refuses to run, here are some things to try:

  • Make sure the file /var/log/sshd.log is writable by the SYSTEM account.

  • Read /var/log/sshd.log for error messages.

To test the server, connect to yourself:

    C:\> ssh localhost

You should be prompted for your password and be able to log in.

Tip

Serverwide configuration files are found in /etc, such as /etc/sshd_config. This is in contrast to Unix-like systems that usually keep these files in /etc/ssh.

14.3.1 Opening Remote Windows on the Desktop

If you want to run graphical applications via ssh that open windows, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Basics for Hackers

Linux Basics for Hackers

OccupyTheWeb .

Publisher Resources

ISBN: 0596008953Errata Page