3 ms·
What you described is quite literally a feature in Ubuntu Server. Type in a github username during the installer to import from github.com/%s.keys to /root/.ss
by RL_Quine 7y ago
What you described is quite literally a feature in Ubuntu Server.
Type in a github username during the installer to import from github.com/%s.keys to /root/.ssh/authorized_keys.
- tialaramex 7y agoMy instinct is that's actually safer than a "set your password and open SSH to the world" step.
- 3fe9a03ccd14ca5 7y agoA cronjob on every one of my IoT crap devices, which sometimes stay stuffed in a shoebox without internet for years: @reboot root ssh-import-id gh:my-username That way when I want to tinker with one, it will pull down my newest GitHub once it reboots and I’ll be able to login. The GitHub key is always up to date.
- dspillett 7y ago> Type in a github username Exactly. That would be the deliberate steps I mentioned as a gate for this causing a problem. If you give it someone else's key you have a problem, though a minor one unless you've been conned into doing so by an adversary who will later scan for accounts that allow their key pair for auth. Importing your own public key this way is not problematical at all. Of course you might end up with people publishing their private key along with the private one, by error or because it seems convenient & they don't think things through...