Table of Contents
Asymmetric Encryption Using Public/Private Keys
Public key cryptography (asymmetric cryptography) is any cryptographic system which
uses pairs of keys: public keys which may be distributed widely, and private keys which
are known only to the owner.
The hallmark feature of this method is the use of asymmetric key algorithms, where the
key used to perform encryption is not the same as the key used in decryption.
So, any person can encrypt a message using the receiver's public key. That message
can then only be decrypted with the receiver's private key.
When used for authentication, the host verifies a holder of the paired private key
by sending him a message encrypted with the owner's public key. Only the holder of the
paired (and secret) private key can decrypt the message (which was encrypted with the
associated public key). Thus whoever is able to send back the decrypted message
proves that they own the associated private key.
SSH Asymmetric Encryption Methods
Typically the following asymmetric encryption methods are used for public/private key exchange:
A common current practice is the use of ED25519 or 4096-bit RSA keys.
Generating Public/Private Keys
Public/Private key pairs are normally generated using the
ssh-keygen tool or an equivalent function provided by the
ssh client
(e.g. ZOC's built-in key generator window).
This will provide the user with a pair of files, e.g. id_rsa and
id_rsa.pub.
The pub file will then be added to the SSH server, while the
private file remains in a folder on the user's computer (under Linux this file will
get file system permissions that make it accessible only to the owner, e.g.
chmod 600 id_rsa).
Uploading the Public-Key to the Server
In order to be used for authentication, the public key part (e.g. id_rsa.pub)
needs to be put in a special file in the user's home folder on the host, so that the SSH server
can use it to verify the login (in order to do this, you need to log in using a different authentication
method, e.g. password).
With ZOC this can be done on a Unix/Linux host using the following sequence of commands:
cd ~/.ssh
rz (or upload the id_rsa.pub file via SCP from ZOC's Transfer menu)
cat id_rsa.pub >> authorized_keys
Full Tutorial
For a detailed step-by-step tutorial see
Creating Public/Private Keys on Windows for Access to Linux Servers.
ZOC Terminal Download
Read more about our ZOC Terminal Emulator,
check its feature list,
look at our screenshots or
start your free 30 days of evaluation today and
download
ZOC Terminal V9.04.5 now.