Create an SSH Key Pair for SFTP Access
Create a Key Pair (MacOS/Windows)
- Create a key
- For a passphrase-encrypted key, enter the following command:
ssh-keygen -m PEM -t rsa -b 4096
You will be prompted to enter a passphrase. Choose a secure passphrase and keep it safe.
- For a key without passphrase encryption, enter the following command instead:
ssh-keygen -m PEM -t rsa -b 4096 -P ""
- Enter a filename
originalfilename
- Change the key to an RFC4716 (SSH2) key format
ssh-keygen -e -f originalfilename.pub > newfilename.pub
Create a Key Pair (PuTTYgen)
- Open PuTTYgen key generator
- Under the "Key" menu item, select "SSH-2 RSA"
- In the main screen in the lower right, enter the number of bits in a generated key: 2048
- Click "Generate"
- After the key has been generated, click "Conversions" from the top menu bar > select "Export OpenSSH Key"
- Save your key in PPK format. This will be the private key.
- Save your public key by clicking "Save public key" with pub format