Create a key pair by executing ssh-keygen2
on the z/OS client
host.
By default, ssh-keygen2
creates a 2048-bit DSA key pair. RSA
keys can be generated by specifying the -t rsa
option. Key length
can be specified with the -b
option. For non-interactive use,
the key can be generated without a passphrase with the -P
option.
$ /usr/lpp/ssh2/bin/ssh-keygen2 -t rsa -b 1024 -P $HOME/.ssh2/mf_key
Generating 1024-bit rsa key pair
2 oOo.oOo.oOo.
Key generated.
1024-bit rsa, TESTUSER@ZOS, Tue Jul 11 2006 01:45:06 -0600
Private key saved to /u/TESTUSER/.ssh2/mf_key
Public key saved to /u/TESTUSER/.ssh2/mf_key.pub
If the -P
option is not used, ssh-keygen2
asks for a
passphrase for the new key.
ssh-keygen2
stores your new authentication key pair in two separate
files. One of the keys is your private key which must never be made
available to anyone but yourself.
In the example above, the private key file is mf_key
. The other file
mf_key.pub
is your public key, which can be distributed to other
computers.
For more information on the ssh-keygen2
options, see the
ssh-keygen2
man page (Appendix ssh-keygen2).