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
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.
C:\> cd \usr\local\bin C:\usr\local\bin> rename bzip2095d_win32.exe bzip2.exe
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
|13.4. Other SSH-Related Products||14.2. Client Use|
Copyright © 2002 O'Reilly & Associates. All rights reserved.