BigAdmin System Administration Portal
Community-Submitted Tech Tip
Print-friendly VersionPrint-friendly Version
This content is submitted by a BigAdmin user. It has not been reviewed for technical accuracy by Sun Microsystems, though it may have been lightly edited to improve readability. If you find an error or would like to comment on the article, please contact the submitter or use the comment field at the bottom of the article. Community submissions may not follow Sun trademark guidelines. For information on Sun trademarks, please see http://www.sun.com/suntrademarks/.
 
 

Creating Null Phrase SSH Keys Using ssh2

Anonymous
  1. Log onto the local system.
  2. Run the ssh-keygen2 command to generate the keys:
    ssh-keygen2 -P -c "filetransfer sys1 - sys2"

    This creates the .ssh2 directory under the user ID's home directory and then creates a couple of files with the keys called:

    id_dsa_1024_a.pub and id_dsa_1024_a

    The id_dsa_1024_a.pub file is the public key that will be renamed and copied to the remote system. The id_dsa_1024_a file is the private key for the user ID on the local host and should not be copied.

    The -P option creates keys with no pass phrase.

    The -c option is used to create a comment.

    Copy the public key to enable it for transfer:

    cp id_dsa_1024_a.pub process.IPAddress.pub

    where "process" is the job, task, or function the key is generated for. "IPAddress" is the IP address of the local system.

    Example:

    cp id_dsa_1024_a.pub ssh.192.168.82.5.pub

    The preceding example creates a file that indicates that the "process" is purely for ssh between systems.

    Running ssh-keygen2 creates the .ssh2 directory in the user's home directory if it does not exist. All files thereafter should be created in this directory.

  3. To ensure that the .ssh2 directory is created on the remote system, run the ssh-keygen2 on that system also. Carry out steps 1 and 2 above on the remote system.
  4. Create an identification file with the name of your private key file in it:
    echo "IdKey id_dsa_1024_a" >identification
  5. Create an authorization file with the following contents:
    echo "Key process.IPAddress.pub" >authorization

    where process = the specific job or reason for the key (filetrassys1sys2), and IPAddress = IP address of local system

  6. To enable transfers between systems using the private or public keys, copy the following files to the remote systems (identification, authorization, public key):
     
    cd .ssh2 
    scp id_dsa_1024_a.pub remotehost:`pwd`/ process.IPAddress.pub 
    scp authorization remotehost:`pwd`/authorization 
    scp identification remotehost:`pwd`/identification 
    

 


The information and links on this page have been provided by a BigAdmin user. The submitter is solely responsible for such information and links. Sun is not responsible for the availability of external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. Sun will not be responsible or liable, directly or indirectly, for any actual or alleged damage or loss caused by or in connection with use of or reliance on the information posted here, or goods or services available on or through any external site or resource.


BigAdmin