Puddinq.com sharing knowledge

Mac generate (more than one) pkk file from private key

Mac generate (more than one) pkk file from private key

You can generate your (first) ssh key with:

$ ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/{typeNameForYourKeyHere} -C "{yourName@yourWorkStation}"

Then you can see the key

$ cat < ~/.ssh/{typeNameForYourKeyHere}

Now for FileZilla you might need the pkk file

Therefor you need putty

$ brew install putty
$ puttygen {typeNameForYourKeyHere} -O private -o {typeNameForYourKeyHere}.ppk

While most people will use id_ed25519 or id_rsa as filenames, when using multiple ssh keys it can be useful to give more specific names at {typeNameForYourKeyHere}. When running the above for a second key, it is important to use another name.

I you use multiple keys you can put a ‘config’ file in your .ssh/ folder and assign different keys for different purposes, like so:

$ touch ~/.ssh/config
$ nano ~/.ssh/config
# github
host github.com
user usernameGithub
Identityfile ~/.ssh/{typeNameForYourKeyHere}

# bitbucket
host bitbucket.org
user usernameBitbucket
Identityfile ~/.ssh/{typeNameForYourKeyHere}