This is just a note for someone who really is unfamiliar with how SSH works.
I have issues managing my SSH keys and using them to
- authenticate myself to GitHub and other forges
- signing using SSH instead of GPG
in a remote environment. Most of my stuff is now using distrobox
. If you want to learn more about it, check out Luca's blog post about it --- https://fedoramagazine.org/run-distrobox-on-fedora-linux, he is the author of distrobox.
Anyway, back to the topic, the issue is I want to manage and use my SSH keys that resides in my REAL home directory but I can't because the ssh running inside my distrobox points to the distrobox's $HOME
directory. The solution?
For authentication
For signing keys
The signing keys do not need to know where the SSH config file is. We don't even need it for the auth as well (see -F /dev/null
) unless you need to use a config from somewhere else.
TPM-generated SSH Keys I think for SSH keys generated by TPM is still something I am trying to figure out first. As far as I know, the TPM library I installed in my host system relies on the hardware TPM that I have (I have yet to confirm). Hence, I can't use my TPM-generated SSH keys for the time being for remote development. You can check out
my old blogon how to set up one -> https://uncomfyhalomacro.pl/blog/using-ssh-keys-with-tpm-and-git. Gentoo Wiki has a good write-up about it too (it's also where I myself decided to try and use it). See https://wiki.gentoo.org/wiki/Trusted_Platform_Module/SSH
Okay, that's all you need to know. If you have some concerns regarding remote development, just reach out to me through email (I rarely not check out after being so busy but I'm going to get back to regularly check emails) or in openSUSE Discord.
SSH Troubleshooting Also, if you experience SSHD using port 22 in your container and it fails? That's because it conflicts with port 22 of your host's SSHD. I changed mine to 69 🥴