Generating ssh key pairs

Learn a public key is always contained inside the private key, you can get that public key using openssl anytime. Read extracting public key and ssh-public key generation from private file in cli at Read how private-public keys work together here.

# Simple ssh keys generation:
#Note if you give filename as myfile, then output will be: myfile and, where myfile is private key and is public key.

# Generating sshkyes using github recommended algorithm:
ssh-keygen -t ed25519 -C ""

# Note: If you are using a legacy system that doesn't support the Ed25519 algorithm, use:
ssh-keygen -t rsa -b 4096 -C ""

# Generate myfile.ppk and (With no prompts for filename, and do set passphrase in prompts):
ssh-keygen -f myfile.ppk
# Output: Two files will be generated i.e, priv key and public key respectively.
# myfile.ppk