You are here: Home Resources Software Login Windows Cygwin

Kerberos SSH in Cygwin on Windows

The Cygwin environment gives you a lot of commands in your Windows environment that normally are available only under Unix/Linux. Among these commands are bash, grep and less. Cygwin is needed because it contains the libraries (i.e. DLL-files) and utility programs that Heimdal will use. After the installation you will be able to use Kerberos enabled login methods to connect to PDC. These use an encrypted channel and protect your data from unwanted guests and you will only need to supply your password only once - on your local machine!

Installation

  1. If you already have an old (1.5 or earlier) Cygwin or Cygwin based installation on your system you have to do some manual steps as described on http://www.cygwin.com/ before upgrading to Cygwin 1.7.
  2. To install Cygwin 1.7 with X11 (you probably want this feature) please follow the instructions described in http://x.cygwin.com/docs/ug/setup.html. Especially note that during step 15 of the install you want to make sure that you select the packages:
    • xorg-server
    • xinit
    • X-start-menu-icons
    • xterm
    • wget
    • libopenssl098
  3. Start the Cygwin X11 server (Programs->Cygwin-X->XWinServer) and an xterm (Programs->Cygwin-X->xterm). The XWin server is controlled (for example ended) by right-click on the small X icon in your taskbar.
  4. Windows will ask you now if you want to open the firewall for XWin. Answer "Keep Blocking" as we do not want anyone to connect to your XWin from the Internet.
  5. Download the pdclogin-0.4 package from the cygwin xterm:
    $ wget ftp://ftp.pdc.kth.se/pub/heimdal/binaries/i386-pc-cygwin/pdclogin-0.4.tar.gz
  6. Check the checksum of the downloaded file:
    $ md5sum pdclogin-0.4.tar.gz
    e73f93bdb53a5300ea119786c83a0191 *pdclogin-0.4.tar.gz
  7. Extract and then open the downloaded file:
    $ tar xzvf pdclogin-0.4.tar.gz
    This will generate a directory named pdclogin-0.4.
  8. Read the README file in the above mentioned directory (any additional information specific to 0.4 will be there).

Usage

  1. Start Cygwin if necessary (as during Install above)
  2. Use the kinit and ssh commands directly or use the pdclogin script (replace NAMES) to login at PDC:

    $ ./pdclogin -Y yourUsername@clusterName.pdc.kth.se 
    Here, yourUsername should be replaced by your PDC user name. Similarily, clusterName should be replaced by the PDC computer which you want to reach. pdclogin is located in ~/pdclogin-0.4 (if you followed the instructions above). pdclogin takes any SSH command line options (like -Y).

     

  3. If you get an error message containing unable to find realm of host then you have not followed the README mentioned during the Install.
  4. In order to transfer files you use the pdccopy script included in the pdclogin-0.4 folder. For instance:
$ ./pdccopy ./README yourUsername@clusterName.pdc.kth.se:~/Private/

would transfer the file README in your local cygwin directory ~/pdclogin-0.4 to the folder Private in your home directory at PDC. For more details, look at the instructions on how to use scp (for Linux for instance).

Another way of transferring files to and from AFS is using an AFS client.

Behind a firewall?

Have a look at this page.