Your browser does not allow storing cookies. We recommend enabling them.


Creating Keys with ssh-keygen-g3 on z/OS

To create a public key pair, run ssh-keygen-g3 on Client:

$ ssh-keygen-g3
Generating 2048-bit dsa key pair
   9 oOo.oOo.oOo
Key generated.
2048-bit dsa, ClientUser@Client, Thu Jan 2 2014 12:09:46 +0200
Passphrase : 
Again :
Private key saved to  /home/ClientUser/.ssh2/id_dsa_2048_a
Public key saved to   /home/ClientUser/.ssh2/

When run without options, ssh-keygen-g3 asks for a passphrase for the new key. Enter a sufficiently long (20 characters or so) sequence of any characters (spaces are OK).

The new authentication key pair consists of two separate files. One of the keys is your private key which must never be made available to anyone but yourself. The private key can only be used together with the passphrase.

The key pair is by default stored in your $HOME/.ssh2 directory (created by ssh-keygen-g3 if it does not exist previously).

In the example above, the private key file is id_dsa_2048_a. The public key file is, and it can be distributed to other computers.

By default, ssh-keygen-g3 creates a 2048-bit DSA key pair. RSA or ECDSA keys can be generated by specifying the -t option with ssh-keygen-g3. Key length can be specified with the -b option. For automated jobs, the key can be generated without a passphrase with the -P option, for example:

$ ssh-keygen-g3 -t rsa -b 1536 -P 

For more information on the ssh-keygen-g3 options, see ssh-keygen-g3(1).


Highlights from the SSH.COM blog:

  • Cryptomining with the SSH protocol: what big enterprises need to know about it

    Cryptomining malware is primarily thought of as targeting desktops and laptops and is used to hijack system resources to mine cryptocurrency.
    Read more
  • SLAM the door shut on traditional privileged access management

    Did you know that something as trivial-sounding as granting access for your developers or third parties to a product development environment can throw a gorilla-sized monkey wrench into your operations and productivity?
    Read more
  • We broke the IT security perimeter

    Everyone understands the concept of a security perimeter. You only gain access if you are identified and authorized to do so.
    Read more