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:


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: