http://miracle.geol.msu.ru/sos/The software is distributed in a format that is probably unfamiliar to most Windows users. First, the software has been packed into a tar archive, which is a common file format on Unix systems. Then the archive has been compressed with bzip2, a compression utility popular among Linux users. For example, the "bzipped" tar archive for Okhapkin's Version 1.2.26 port is ssh-1.2.26-cygwinb20.tar.bz2. In this version of Okhapkin's SSH1, the clients (ssh1, scp1) run under 32-bit Windows systems; we installed them under Windows 95. The server (sshd ) runs only on Windows NT. For the conservative installation we describe, you need 40 MB of disk space to hold both SSH and the Cygwin support software and another 20 MB during installation, so make sure to have 60 MB free. SSH itself requires only 1 MB, so if you want to save space after the installation, you can delete most of Cygwin.
To create C:\home\.ssh you must use the DOS mkdir command. Windows doesn't create folders with names beginning with a period.C:\usr C:\usr\local C:\usr\local\bin C:\etc C:\home C:\home\.ssh Note the period! C:\tmp
C:\> mkdir C:\home\.ssh
Next, set the environment variable CYGWIN to have the value "tty":PATH=%PATH%;C:\usr\local\bin;C:\Cygwin\bin
This is required so the ssh1 client can run interactively. Finally, save autoexec.bat, open an MS-DOS command line, and apply your changes:SET CYGWIN=tty
C:\> C:\autoexec
Your full name.
The folder /home, where your SSH folder is created. Note the direction of the slash; it's not the MS-DOS folder separator, but the slash on the question-mark key.
smith:*:500:50:Amy Smith:/home:/command.com
http://sourceware.cygnus.com/cygwin/Install the binary release: the source code is unneeded for our purposes. The official download and installation can take quite some time, so you might consider downloading only cygwin1.dll and not the many accompanying programs. At press time, it is located on the Cygwin mirror machines (reachable from the URL above) in the /pub/cygwin/latest/cygwin folder. The distribution is in gzipped tar format (.tar.gz filename suffix), which WinZip for Windows can unpack. Copy cygwin1.dll to the folder C:\usr\local\bin you created earlier.
http://sourceware.cygnus.com/bzip2/Download the program to the folder C:\usr\local\bin. The program is ready to run without any installation. Its name at press time is bzip2095d_win32.exe, but this could change as future revisions are released. Rename the bzip2 executable to bzip2.exe :
C:\> cd \usr\local\bin C:\usr\local\bin> rename bzip2095d_win32.exe bzip2.exe
http://miracle.geol.msu.ru/sos/The filename is ssh-1.2.26-cygwinb20.tar.bz2. Because the name has multiple periods, your download software might automatically rename the file, eliminating all periods but the last, e.g., ssh-1_2_26-cygwinb20_tar.bz2. Uncompress the file with bzip2 to produce a tar file:
Extract the tar file in the root of the C: drive. This unpacks files into C:\usr :C:\temp> bzip2 -d ssh-1_2_26-cygwinb20_tar.bz2
If you skipped installing the full Cygwin package, [Section 14.1.4, "Install Cygwin"] you might not have a tar program. The popular WinZip program for Windows is also capable of unpacking the tar file (after you run bzip2). Be sure to unpack it into the root of the C: drive. The SSH1 client software is now installed.C:\temp> cd \ C:\> tar xvf \temp\ssh-1_2_26-cygwinb20_tar
In the C:\home\.ssh folder, ssh-keygen1 creates a private key file identity and public key file identity.pub. The output looks something like the following. Ignore the line w: not found caused by a harmless difference between Unix and Windows.C:\> ssh-keygen1
ssh-keygen1 then prompts for a file in which to save the key. Accept the default by pressing the Enter key:Initializing random number generator... w: not found Generating p: ....................++ (distance 352) Generating q: ..........++ (distance 140) Computing the keys... Testing the keys... Key generation complete.
You are then prompted for a passphrase for your private key. Choose a good one and type it twice. It doesn't display onscreen.Enter file in which to save the key (/home/.ssh/identity): [press Enter]
Your key pair is now generated and saved in the folder C:\home\.ssh. Copy your public key (identity.pub) to any SSH server machine where you want to connect, appending it to your remote ~/.ssh/authorized_keys file. [Section 2.4.3, "Installing a Public Key on an SSH ServerMachine"]Enter passphrase: ******** Enter the same passphrase again: ********
On your first attempt, ssh1 adds the remote host to its known hosts database. [Section 2.3.1, "Known Hosts"] Answer yes and continue:C:\> ssh1 -l smith server.example.com
Finally, you're prompted for your passphrase:Host key not found from the list of known hosts. Are you sure you want to continue connecting (yes/no)? yes Host 'relativity.cs.umass.edu' added to the list of known hosts.
If all goes well, you are now logged into the remote host via SSH. You can also run individual commands by SSH in the usual way, providing a command at the end of the line:Enter passphrase for RSA key 'You@YourPC': ********
C:\> ssh1 -l smith server.example.com /bin/who
C:\> scp1 C:\autoexec.bat [email protected]:
13.4. Other SSH-Related Products | 14.2. Client Use |
Copyright © 2002 O'Reilly & Associates. All rights reserved.