Article 5D8AC Cron job importing public keys from Github account, good idea?

Cron job importing public keys from Github account, good idea?

by
snacksy
from LinuxQuestions.org on (#5D8AC)
So i am very new to the server world, so i am trying to learn. :study:

My server got hacked from a ssh brute force attack, so i reinstalled the OS and am currently trying not to make the same mistake again!
The world sure isn't kind to new folks around here lol.

This time i will use SSH keys and disable password login. So after finding out i can store my SSH keys on Github i tought it would be smart to have a Cron job that runs.
This way if i move to a new computer i can just upload them to Github and be ready to go, no moving private keys required (a supposedly big nono)
Code:0 * * * * ssh-import-id-gh User-NameI have 2 factor auth setup for GitHub so it would be hard to hack me there. Is this a smart thing to do?

:jawa: What does the council of LinuxQuestions say, what is my faith? :jawa:latest?d=yIl2AUoC8zA latest?i=RCcaPuqnvQQ:ehHAqUIr9Ns:F7zBnMy latest?i=RCcaPuqnvQQ:ehHAqUIr9Ns:V_sGLiP latest?d=qj6IDK7rITs latest?i=RCcaPuqnvQQ:ehHAqUIr9Ns:gIN9vFwRCcaPuqnvQQ
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments