How do I generate ssh RSA keys under Linux operating systems?
You need to use the ssh-keygen command as follows to generate RSA keys (open terminal and type the following command):ssh-keygen -t rsa
ORssh-keygen
Sample outputs:
If you created your key with a different name, or if you are adding an existing key that has a different name, replace idrsa in the command with the name of your private key file.
RSA key pair in PEM format (minimum 2048 bits). See How to Generate an API Signing Key. Fingerprint of the public key. See How to Get the Key's Fingerprint. Tenancy's OCID and user's OCID. See Where to Get the Tenancy's OCID and User's OCID. Upload the public key from the key pair in the Console. See How to Upload the Public Key.
The -t type option specifies the type of key to create. The possible values “rsa†or “dsa†for protocol version 2. The $HOME/.ssh stores the following two files:
Please do not share keys file with anyone else. You can upload keys to remote server as follows:ssh-copy-id [email protected]
Finally, you can login to remote server as follows:ssh [email protected]
scp file.txt [email protected]:~/data2/
ADVERTISEMENTS