I would like to copy an ssh key to my Android phone. However, I have displaced t
ID: 656995 • Letter: I
Question
I would like to copy an ssh key to my Android phone. However, I have displaced the connection cable for my computer. I am looking for a safe way to transfer the key to the device.
Obviously, I don't want to send it to my device using email (attack vectors everywhere). Using bluetooth is not an option since my laptop doesn't support it. I could transfer the key safely to my server via SSH and then copy it back using Password authentification, but I feel like there must be a "cleaner" way of doing this that doesn't involve broadcasting the keys into the internet in some form.
Explanation / Answer
You might want to try using a QR code to copy the key over. Generate the QR code on the laptop and scan it using your phone's camera. Obviously, dont use an online service to generate it, linux has a qrencode library which does that.
I have tried converting my PGP public key into a QR code and the phone successfully read it. However, if your ssh key is too long, you might have to split it up into sections.