Procedure:
----------

1) Download the openSSH package from the below location : 

   http://support.netapp.com/NOW/download/tools/perfstat/OpenSSH.zip  

2)  Extract OpenSSH.zip  to c:\temp\

3)  Open a Windows Command Line by typing cmd in the Run Prompt

4)  Change working directory to the extracted files by executing the below command
    
    cd c:\temp\OpenSSH\bin
 
    
5) create the default groups by executing the below command when command prompt is at c:\temp\openSSH\bin
   
   mkgroup -l >> ..\etc\group
   

6) create the default users by executing the below command when command prompt is at c:\temp\openSSH\bin

    mkpasswd -l >> ..\etc\passwd


7) Open c:\temp\OpenSSH\etc\passwd file with Wordpad and change the home directory of current user. 

   a) Find the home directory for the current user by using the below command:

      echo %HOMEPATH%

      Example:

      C:\> echo %HOMEPATH%
          \Users\Administrator

   Copy the string(homepath) till the username (which is Administrator in the above example) and prefix this string with "/cygdrive/c" in unix format. 
   So precisely after this operation the string will look like "/cygdrive/c/Users"
      

   b) Edit the following line for 'Administrator' user in the "C:\temp\OpenSSH\etc\passwd" file

   Administrator:unused_by_nt/2000/xp:500:513:U-KSUDHIR-PC\Administrator,S-1-5-21-2861245511-833278636-3590319104-500:/home/Administrator:/bin/switch

 and change the "home" string with the string returned in step 7(a) as follows:

  Administrator:unused_by_nt/2000/xp:500:513:U-KSUDHIR-PC\Administrator,S-1-5-21-2861245511-833278636-3590319104-500:/cygdrive/c/Users/Administrator:/bin/switch

 --NOTE: "home" string is changed with "/cygdrive/c/Users".
	

8) create directory for the openSSH keys by executing the below command

   mkdir c:\temp\openSSH\.ssh

9) Now generate the ssh public-private key pair by executing the commands

   cd c:\temp\openSSH\.ssh

   "c:\temp\openSSH\bin\ssh-keygen.exe" -t rsa  -f c:\temp\OpenSSH\.ssh\id-rsa

    
10) Now change the permission of the private key to '400'by executing the below command when the command prompt is at c:\temp\openSSH\.ssh.

    "c:\temp\openSSH\bin\chmod.exe"  400  id-rsa
     
    --Note: If the permissions are not changed to 400, authentication with key will not work.


11) Now Create the directory structure on the storage system by executing the below command 

    mkdir \\<filer>\etc\sshd\<username>\.ssh
       

    -- Note: An error may be generated if this path already exists.  This can be safely ignored. 

   Example: 

   If the 'username' is "foo" and Ip is "10.128.141.60", the command looks like
   c:\temp\openSSH\.ssh> mkdir \\10.128.141.60\etc$\sshd\foo\.ssh


12) Append the c:\temp\openSSH\.ssh\id-rsa.pub file to the Storage Controller's \\filer\etc$\sshd\<username>\.ssh\authorized_keys file by executing the command
    when command prompt is at c:\temp\openSSH\.ssh

    type id-rsa.pub >> \\<filer_ip>\etc$\sshd\<username>\.ssh\authorized_keys

    Example: 

    if the 'username' is "foo",and Ip is "10.128.141.60"

    c:\temp\openSSH\.ssh>type id-rsa.pub >> \\10.128.141.60\etc$\sshd\foo\.ssh\authorized_keys  


13)  Test the connection ( has to be passwordless! and return the  data ONTAP version running on the filer) by executing the below command when command prompt is at c:\temp\openSSH\.ssh :

     ssh.exe -i /cygdrive/c/temp/OpenSSH/.ssh/id-rsa -l <username> <filer_ip> "version"

     --NOTE: if password is requested - perfstat won't work and one of previous steps failed.

     Example:

     If the 'username' is "root" and ip is "10.128.141.60"
     c:\temp\openSSH\bin> ssh.exe -i /cygdrive/c/temp/OpenSSH/.ssh/id-rsa -l root 10.128.141.60 "version"
   
     Output will be:
     NetApp Release 8.1RC2 7-Mode: Thu Oct 27 19:26:06 PDT 2011

14) Extract Perfstat7 file into c:\temp\OpenSSH\bin and execute the below command when command prompt is at c:\temp\openSSH\bin:

perfstat.exe -f <filer_ip> -S kf:/cygdrive/c/temp/OpenSSH/.ssh/id-rsa -l root -g > c:/temp/perfstat_out

in case you need to add itterations, add in the end of command:
perfstat.exe -f <filer_ip> -S kf:/cygdrive/c/temp/OpenSSH/.ssh/id-rsa -l root -i <number_of_iterations> -t <time> -g > c:/temp/perfstat_out
