 If you are running a witness, full node, web server, or any Linux box the very first thing you should do is to stop using root to login, and set up SSH key authentication and disable root logins. This process is surprisingly easy once you have done it a few times, but this guide will make it absolutely painless even for the non-admin types. The post looks overwhelming, but it isn't a long process, I can do it inside of five minutes on new servers. When you first get a Linux server you will most likely receive a root password and sign in with that. Continuing to log in using this account is very insecure and not recommend. Not only does this allow anyone who breaks your password access to everything on your system, it means you are doing every command with full admin access even when you don't need it. These steps are what I do with every server I own or work with. All my servers are Debian based (mostly all Ubuntu at this point) so these commands will be for Ubuntu. They should be the same for most versions of Linux except for the `Update Packages` section, which will use `yum` on RedHat flavors like CentOS. To properly secure a new (or current) server, you want to do these steps, all of which I will cover in detail below. * Change root password * Update Packages * Create New User * Add new user to `sudo` group * Create SSH Key * Install SSH Key for new user * Test SSH Key authentication * Disable root login & password authentication # Change Root Password The first thing you should do is change your root password. Most service providers will give you a short 8-16 character password to get you started. This is also usually displayed in clear text in their control panel. You are going to want to change this password immediately, I recommend a secure password like this: `jsEwnxFr3Dj]%&-K}i_}zU:R,oz=3=86a7A*.jD9tz8Aq*Y7-fM%FkQw_.:UWM#n` As ridiculous as it looks, you will never need this password except in extreme emergencies. Using a good password manager will make this an easy process. Going forward you will only need your custom user password to do anything as root, so this password won't typically be used. Be sure to keep this password safe. <center></center> To change your password in Linux just issue the following command and follow the prompts. `passwd` # Update Packages This is the only thing I recommend doing before the next steps, but even this can be done later. I like to do it first just to get it over with and make sure I am dealing with an up to date system. Each provider will provide the server in different states. The first step is to download an updated list of packages. You do this with the `sudo apt update` command.   This will update the operating systems package manager (`apt` or `apt-get`) has the most current list of packages that can be installed. This does not upgrade any packages, it just updates the database that tells `apt` what packages can be installed. We next want to tell `apt` to update all packages that are installed. To upgrade all packages to the latest version and resolve any dependencies properly, you use `sudo apt dist-upgrade`.   You may already be familiar with `apt upgrade` and not `apt dist-upgrade`. You can see the difference here:  *tl;dr Unless you are using advanced apt features like freezing versions and running personal package archives (PPA) then you should use `apt dist-upgrade` to resolve all dependencies automatically.* # Create New User Now that we know the system is up to date, you need to create a user account of yourself. Logging in as root is insecure as it exposes root to the public but it also means you will use root for every task regardless if you require it. Create a user is very easy, let's make a user `hoban` `sudo adduser hoban` It will ask you for a password, for this password you want something long, complex, but something you can remember as you will type it everytime you want to do something as root.  I like to have a `Full Name` but I don't fill in the rest of the options, just hit enter and then Y to confirm. From this point on, you will only login as this user, but don't logout yet. Let's do one more thing, and then we will switch users. # Add new user to `sudo` group Now that we have a new user, we are going to want to give that user `sudo` access. To do this, you add the user to do the `sudo` group. `usermod -aG sudo hoban` You will not receive any feedback from this command unless you did something wrong. If you don't know what `sudo` is, `sudo` allows you to run commands as an unprivledged user with root power while properly logging who executed the command. This last feature is critical for multi-admin systems. Basically, if you want to do something that requires root permissions, prefix the command with `sudo`. You will notice I used `sudo` above, even though I was root. I did this for two reasons. To prevent any issues if you were doing the commands on an account other than root, but also to get you in the mindset of using it. At this point, login to SSH again using your new credentials. You can test to make sure you got everything correct at this point by doing the following command: `sudo apt update` You will be promopted for your password and then should see the package list update. If you get a permission denied after doing the password correctly, make sure you have executed `sudo usermod -aG sudo hoban`, replacing `hoban` with whatever user you created. You will need to do this as root, and relogin as your user when adding a group. # Create SSH Key At this point, we want to create our SSH key pair, this is a public and private key you will use as a `what you have` type of security. Using a passphrase on your key is optional, but I highly recommend using a passphrase. Once you use an SSH key for authentication, that is all that is required to get into any server you add your key to. Without a passphrase, they don't need to know anything, they only need access to your private key. A good SSH client like `SecureCRT` or using SSHAgent will make using a passphrase less painful. I highly recommend using `ed25519` algorithm for your SSH key, most system support this algorithm but keep in mind some older software will not. If you use an SSH client on your mobile phone or some older clients, you want to confirm support. I would opt to upgrade your software over resorting to using the current standard RSA key. The difference between `rsa` and `ed25519` is minor but significant. `rsa` uses elliptical curves that many believe have been compromised by the NSA. `ed25519` uses new algorithms that are much more secure. You can read the differences in detail [here](https://stribika.github.io/2015/01/04/secure-secure-shell.html) if you have the stomach for it. There is two popular ways to create an SSH key. Using your SSH Client (Putty, SecureCRT, or whatever you use) or using `ssh-keygen` on Linux. If you use Linux, you will need to download the private key off the server and delete it. This is not as secure as doing it all on your private workstation. If you have local Linux/Mac machine, you can run the following command to make an ssh key using ed25519. `ssh-keygen -t ed25519`  You will be prompted where to save the files, and if you want a passphrase (Yes, yes you do!). By default this will create two files, `id_ed25519` and `id_25519.pub`. The first is your private key, and is what you use on your workstation to confirm your identity, the second is what you put on any server that you want to be able to login into. It is safe to share your public SSH key, but your private ssh key you shoudl treat like your Bitcoin private key. PuttyGen is the easiest way to create an SSH Key on Windows. Make sure you choose ed25519 and follow the prompts and save the public and private key some where safe. You will need to configure your SSH client to point to your private key, and you will need to install your public key on your server [next step]. # Install SSH Key for new user To install your public key on your server involves a couple of steps. First login as your personal user account, you will not need root for any of these commands, so do not use `sudo` as we are only changing your local user files. #### make sure you are in your home folder `cd ~` #### make .ssh directory `mkdir .ssh` #### lock down permissions on .ssh `chmod 700 .ssh` #### add your key `vim .ssh/authorized_keys` Paste the one-line of text from your public key file and hit escape to go into command mode then write & exit. Hit escape `:wq` # Write & Exit #### Change permission of your public key `chmod 644 .ssh/authorized_keys` At this point, you should be all set. If you did everything correctly you should be able to login with just your SSH key and passphrase. # Test SSH Key authentication Add your private key to your SSH client, and make sure you disable password authentication and only leave public key authentication enabled. For the most popular SSH client (Putty) you will want to add your private key here:  Once you have confirmed you can log in via your SSH key and hopefully a passphrase, you will want to disable root login and password authentication. # Disable root login & password authentication </br> **WARNING** DO NOT DO THIS STEP UNTIL YOU HAVE CONFIRMED YOU CAN LOGIN WITH YOUR SSH KEY </br> You will lose access to your server if you have not first confirmed you can log in with only your SSH Key and passphrase. If you have confirmed you can log in, we will now edit the SSH server files to prevent anyone from being able to log in as root or with a password. `sudo vim /etc/ssh/sshd_config` Look for the two lines: `PermitRootLogin yes` `PasswordAuthentication yes` You want to make both of these no, and his escape `:wq` to save and exit. You will then need to restart the ssh daemon with the following command. `sudo systemctl restart ssh` It will warn you of losing connections if things are not set up properly. Hit yes, and *do not log out!*. Immediately open a new SSH connection and confirm you can log in before closing this session. This is your only last ditch effort to save yourself if you didn't do all the steps properly. That's it, the post was really long, but the actual steps are quite quick and easy.
author | themarkymark |
---|---|
permlink | how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong |
category | sysadmin |
json_metadata | {"tags":["sysadmin","security","linux","witness-category","witness"],"image":["https://steemitimages.com/DQmbYrjFovvq3TLdihx2j5f9FBftavQEacCwvUtAAGiL9zy/image.png","https://steemitimages.com/DQmd6s3JyiM9z8gGbUUExUkKABmsMS7VwPEiucF1oVUG4en/image.png","https://i.imgur.com/3NbtEoL.png","https://i.imgur.com/wl6Jv7B.png","https://i.imgur.com/b1ZQcO9.png","https://i.imgur.com/MH6utth.png","https://i.imgur.com/CQsxT2l.png","https://i.imgur.com/IdfFksI.png","https://i.imgur.com/4zNwBgm.png","https://steemitimages.com/DQmUjjVECFv5aZdD6Fx4WXBRqi2gdaneEASSJKtTusRLuEz/image.png"],"links":["https://stribika.github.io/2015/01/04/secure-secure-shell.html"],"app":"steemit/0.1","format":"markdown"} |
created | 2018-01-12 16:53:30 |
last_update | 2018-01-16 20:24:33 |
depth | 0 |
children | 51 |
last_payout | 2018-01-19 16:53:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 43.124 HBD |
curator_payout_value | 10.504 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 10,877 |
author_reputation | 1,774,088,473,727,210 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,045,720 |
net_rshares | 6,763,764,444,929 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
fminerten | 0 | 69,684,650,848 | 2% | ||
steempty | 0 | 54,562,961,880 | 2% | ||
berkah | 0 | 13,858,775,682 | 15% | ||
wackou | 0 | 292,903,832,283 | 4% | ||
pharesim | 0 | 87,182,520,053 | 0.25% | ||
kushed | 0 | 46,162,281,705 | 25% | ||
stone1 | 0 | 3,036,279,620 | 25% | ||
steemychicken1 | 0 | 27,045,101,097 | 25% | ||
bue | 0 | 27,670,309,021 | 100% | ||
joseph | 0 | 53,076,613,498 | 25% | ||
aizensou | 0 | 66,720,185,989 | 25% | ||
b0y2k | 0 | 215,355,609,460 | 25% | ||
mrs.agsexplorer | 0 | 17,195,179,653 | 6% | ||
stoner19 | 0 | 10,102,755,631 | 25% | ||
pnc | 0 | 45,868,118,221 | 15% | ||
cryptogee | 0 | 62,015,036,094 | 100% | ||
teamsteem | 0 | 1,635,391,096,371 | 15% | ||
richman | 0 | 410,293,875,151 | 100% | ||
razvanelulmarin | 0 | 21,797,361,931 | 25% | ||
hitmeasap | 0 | 9,322,653,246 | 7.5% | ||
rxhector | 0 | 9,891,460,668 | 100% | ||
anyx | 0 | 153,086,034,794 | 20% | ||
raymondspeaks | 0 | 2,417,186,196 | 25% | ||
pkattera | 0 | 390,538,893,093 | 20% | ||
knozaki2015 | 0 | 439,657,799,799 | 25% | ||
shawnamawna | 0 | 5,494,165,980 | 25% | ||
mynameisbrian | 0 | 87,096,688,754 | 100% | ||
ubg | 0 | 208,686,482 | 1% | ||
bitcoiner | 0 | 23,672,462,167 | 15% | ||
hagie | 0 | 30,136,910,207 | 25% | ||
alexpmorris | 0 | 48,000,840,757 | 20% | ||
coinbar | 0 | 4,868,113,699 | 25% | ||
thebluepanda | 0 | 45,567,542,160 | 25% | ||
yoshiko | 0 | 51,488,597,653 | 25% | ||
thisisbenbrick | 0 | 7,873,143,625 | 25% | ||
trending | 0 | 51,616,366,878 | 100% | ||
sirwinchester | 0 | 48,315,811,429 | 25% | ||
einsteinpotsdam | 0 | 7,565,946,560 | 25% | ||
zahnspange | 0 | 559,710,558,957 | 25% | ||
abh12345 | 0 | 107,942,295,354 | 15% | ||
steemsquad | 0 | 1,835,450,009 | 25% | ||
allesgruen | 0 | 3,127,334,994 | 25% | ||
dannystravels | 0 | 8,794,986,464 | 25% | ||
jerryblanceton | 0 | 6,749,818,893 | 25% | ||
platinum-blue | 0 | 25,623,715,273 | 25% | ||
timbernana | 0 | 10,609,865,003 | 25% | ||
sherlockcupid | 0 | 27,516,808,068 | 25% | ||
techslut | 0 | 114,093,168,220 | 10% | ||
dark.horse | 0 | 5,021,045,051 | 25% | ||
jamzed | 0 | 5,275,367,810 | 100% | ||
adventureevryday | 0 | 8,359,382,510 | 22.5% | ||
toyman | 0 | 12,631,908,322 | 25% | ||
ethandsmith | 0 | 2,073,184,328 | 0.5% | ||
personz | 0 | 38,925,266,260 | 100% | ||
i-gordan | 0 | 11,064,431,495 | 25% | ||
buzzbeergeek | 0 | 20,534,502,433 | 25% | ||
bigdaddy | 0 | 20,024,079,755 | 25% | ||
kingsmind | 0 | 4,323,161,004 | 25% | ||
eirik | 0 | 10,259,160,182 | 25% | ||
nicnas | 0 | 43,642,778,272 | 100% | ||
greenstar | 0 | 4,465,832,554 | 15% | ||
scrooger | 0 | 141,853,367 | 0.09% | ||
abigailmtz | 0 | 98,384,158 | 100% | ||
romedog | 0 | 274,559,331,884 | 25% | ||
sunshinetraveler | 0 | 11,776,316,857 | 25% | ||
eveuncovered | 0 | 22,819,979,478 | 25% | ||
kryzsec | 0 | 3,384,878,263 | 29% | ||
neander-squirrel | 0 | 33,787,888,757 | 100% | ||
spg | 0 | 8,762,569,262 | 25% | ||
freefuture | 0 | 6,623,230,273 | 25% | ||
diogogomes | 0 | 0 | 84% | ||
kinakomochi | 0 | 12,488,511,364 | 25% | ||
chuckyfucky | 0 | 1,001,948,598 | 100% | ||
derrick829 | 0 | 34,696,352,534 | 2.5% | ||
drakos | 0 | 133,249,144,848 | 35% | ||
professorbromide | 0 | 5,257,046,696 | 25% | ||
offoodandart | 0 | 57,252,531,317 | 100% | ||
sammosk | 0 | 38,135,504,391 | 25% | ||
biancajapan | 0 | 8,413,536,868 | 25% | ||
stitchybitch | 0 | 7,208,523,618 | 25% | ||
jrswab | 0 | 10,630,832,677 | 25% | ||
fivefiveeleven | 0 | 40,290,535,185 | 70% | ||
themarkymark | 0 | 205,332,054,586 | 100% | ||
leaky20 | 0 | 7,794,975,367 | 100% | ||
edwardthomson | 0 | 0 | 100% | ||
nettybot | 0 | 10,351,633,410 | 100% | ||
matrixonsteem | 0 | 349,514,460 | 100% | ||
steemliberator | 0 | 318,907,113 | 100% | ||
jjb777 | 0 | 5,920,417,687 | 100% | ||
lohithacharya | 0 | 525,346,076 | 100% | ||
prudence | 0 | 693,250,417 | 100% | ||
msp3k | 0 | 1,253,855,358 | 100% | ||
witnessstats | 0 | 359,701,118 | 100% | ||
rachelhanson10 | 0 | 1,453,487,893 | 25% | ||
arrkiin | 0 | 15,065,575,290 | 100% | ||
steemthat | 0 | 2,363,662,979 | 5% | ||
kriptonoob | 0 | 3,987,600,713 | 12.5% | ||
yabapmatt | 0 | 93,878,119,296 | 100% | ||
animagic | 0 | 670,837,786 | 6% | ||
r2steem2 | 0 | 362,318,226 | 100% | ||
qurator | 0 | 16,688,256,726 | 0.3% | ||
steemcreate | 0 | 365,617,387 | 100% | ||
xr-hammergaming | 0 | 2,347,506,369 | 10% | ||
socialspace | 0 | 20,942,565,544 | 20% | ||
kslo | 0 | 4,488,375,887 | 100% | ||
thashadowbrokers | 0 | 51,809,962 | 100% | ||
ohicklin | 0 | 2,892,799,410 | 70% | ||
afsanamitul1 | 0 | 506,965,623 | 100% | ||
dmwh | 0 | 18,316,250,391 | 100% | ||
brotato | 0 | 204,106,897 | 100% | ||
pizaz | 0 | 203,897,827 | 100% | ||
triplethreat | 0 | 52,979,416 | 100% | ||
conflaxus | 0 | 50,506,817 | 100% | ||
tittilatey | 0 | 51,790,344 | 100% | ||
cajun | 0 | 210,059,243 | 100% | ||
coonass | 0 | 203,925,185 | 100% | ||
squirrelnuts | 0 | 203,925,143 | 100% | ||
steemdevs | 0 | 209,892,158 | 100% | ||
jeezy | 0 | 51,725,172 | 100% | ||
test.with.dots | 0 | 50,503,003 | 100% | ||
pi-pi | 0 | 51,708,735 | 100% | ||
listentosteem | 0 | 50,474,852 | 100% | ||
franciscopiano | 0 | 614,598,214 | 100% | ||
yuriboyka | 0 | 516,095,315 | 100% | ||
gravy | 0 | 50,459,864 | 100% | ||
pieter87 | 0 | 1,233,959,401 | 100% | ||
farhanrajpoot129 | 0 | 0 | -100% | ||
cryptosmile | 0 | 71,025,520 | 100% | ||
mindsmania | 0 | 0 | -100% | ||
zsike | 0 | 411,852,232 | 100% | ||
maamirh | 0 | 0 | 100% | ||
nwjordan | 0 | 202,785,000 | 100% | ||
aarecipes | 0 | 0 | -100% | ||
keiwop | 0 | 614,500,000 | 100% | ||
deagle0099 | 0 | 374,845,000 | 100% | ||
evoclen | 0 | 113,682,500 | 100% | ||
maxpatternman | 0 | 614,500,000 | 100% | ||
shrinivasdontul | 0 | 144,392,076 | 100% | ||
westside33 | 0 | 0 | 100% | ||
tahirpk | 0 | 0 | 100% |
Top notch tutorial, @themarkymark! I will need this very soon.
author | cryptonik |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t165641776z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"users":["themarkymark"],"app":"steemit/0.1"} |
created | 2018-01-12 16:56:42 |
last_update | 2018-01-12 16:56:42 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 16:56:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 62 |
author_reputation | 2,299,620,450,256 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,046,371 |
net_rshares | 497,748,066 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
afsanamitul1 | 0 | 497,748,066 | 100% |
>If you are running a witness, full node, web server, or any Linux box the very first thing you should do is to stop using root to login, and set up SSH key authentication and disable root logins. This summarises and anybody expecially network admins should take it serious. It's sometimes to hear of boxes getting owned and compromised because of mistakes like this. Thanks for sharing this as it'll go a long in helping a lot of persons to be security conscious when it comes to network security. You're so apt and your research and write up is spot on. **Happy Steeming**
author | enolife |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t165703443z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 16:57:06 |
last_update | 2018-01-12 16:57:06 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 16:57:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 578 |
author_reputation | 3,291,168,947,960 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,046,443 |
net_rshares | 0 |
author | farizalm |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180426t101031207z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"users":["themarkymark"],"app":"steemit/0.1"} |
created | 2018-04-26 10:10:36 |
last_update | 2018-04-26 10:10:36 |
depth | 1 |
children | 0 |
last_payout | 2018-05-03 10:10:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 41 |
author_reputation | 3,589,261,901,224 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 52,231,877 |
net_rshares | 1,110,522,867 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
farizalm | 0 | 602,127,301 | 100% | ||
farizalma | 0 | 508,395,566 | 100% |
Very good Tutorial, im still following to get TOP News....
author | hoschitrooper |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t170136417z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 17:01:36 |
last_update | 2018-01-12 17:01:36 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 17:01:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 59 |
author_reputation | 1,965,642,081,416 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,047,322 |
net_rshares | 0 |
I'm a newish Linux user with mint, which, as I understand doesn't let you use the root account. Although the main account can do root commands with sudo.. but I still don't quite understand the distinction and if, I shouldn't use that main account still. Any advice would be appreciated
author | inquiringtimes |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t173307463z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 17:33:09 |
last_update | 2018-01-12 17:33:09 |
depth | 1 |
children | 11 |
last_payout | 2018-01-19 17:33:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 288 |
author_reputation | 22,511,044,719,347 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,053,480 |
net_rshares | 0 |
sudo just gives you temporary root permissions. You can think of the sudo command as a temporary switch user command. The `su` command in linux allows you to switch user so `sudo` is like "switch user, do as". Try it yourself, with your main account type the `whoami` command and it should return your username. Then type `sudo whoami` and and it should return `root`. This just tells you that what ever command you run after `sudo` you run with `root` permissions.
author | kslo |
---|---|
permlink | re-inquiringtimes-re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t192647472z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 19:26:45 |
last_update | 2018-01-12 19:26:45 |
depth | 2 |
children | 9 |
last_payout | 2018-01-19 19:26:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 470 |
author_reputation | 574,428,101,189 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,072,911 |
net_rshares | 0 |
yeah, but confusing why sudo accepts my account password, and mint doesn't even let you log into root with su.... so I'm feeling like I'm secure because mint doesn't let me use root, but wondering if I'm less secure than I think.... :-(
author | inquiringtimes |
---|---|
permlink | re-kslo-re-inquiringtimes-re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t195125095z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 19:51:24 |
last_update | 2018-01-12 19:51:24 |
depth | 3 |
children | 8 |
last_payout | 2018-01-19 19:51:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.028 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 236 |
author_reputation | 22,511,044,719,347 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,076,905 |
net_rshares | 4,169,704,839 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
kslo | 0 | 4,169,704,839 | 100% |
Most "workstation" Linux builds create a regular user during the install because it is so important not to use root as your main account.
author | themarkymark |
---|---|
permlink | re-inquiringtimes-re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t190215010z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 19:02:12 |
last_update | 2018-01-12 19:02:12 |
depth | 2 |
children | 0 |
last_payout | 2018-01-19 19:02:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 137 |
author_reputation | 1,774,088,473,727,210 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,068,865 |
net_rshares | 0 |
hi @themarkymark i will send 1sbd to @upmyvote, what percent will upvote in my post. @ipromote weak
author | israruddin |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180113t002840101z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"users":["themarkymark","upmyvote","ipromote"],"app":"steemit/0.1"} |
created | 2018-01-13 00:28:45 |
last_update | 2018-01-13 00:28:45 |
depth | 1 |
children | 1 |
last_payout | 2018-01-20 00:28:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 99 |
author_reputation | 1,870,153,445,814 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,117,393 |
net_rshares | 0 |
You got $1.35 for your $0.50 bid. I wouldn't call it weak, it's much smaller than my other bots but also has a lower minimum. 
author | themarkymark |
---|---|
permlink | re-israruddin-re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180113t010914749z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"image":["https://steemitimages.com/DQmegdoYsCDegDXPKg9Hzdu1AJpWc3RKDNu7PX8h3CPQjwm/image.png"],"app":"steemit/0.1"} |
created | 2018-01-13 01:09:12 |
last_update | 2018-01-13 01:09:12 |
depth | 2 |
children | 0 |
last_payout | 2018-01-20 01:09:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 217 |
author_reputation | 1,774,088,473,727,210 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,122,641 |
net_rshares | 0 |
Wow. Great post.
author | iyos |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t180425580z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 18:04:30 |
last_update | 2018-01-12 18:04:30 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 18:04:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 16 |
author_reputation | -46,147,779 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,059,046 |
net_rshares | 0 |
Nice tutorial. I can add the following points: - U can use ssh-copy-id to install authorized keys easily - For public servers u might want to change the default sshd port (e.g. 2222). Otherwise u might get lots of connection tries and big log files. Thanks. J
author | jjb777 | ||||||
---|---|---|---|---|---|---|---|
permlink | re-themarkymark-2018112t183921795z | ||||||
category | sysadmin | ||||||
json_metadata | {"tags":["sysadmin","security","linux","witness-category","witness"],"app":"esteem/1.5.0","format":"markdown+html","community":"esteem"} | ||||||
created | 2018-01-12 17:39:27 | ||||||
last_update | 2018-01-12 17:39:27 | ||||||
depth | 1 | ||||||
children | 1 | ||||||
last_payout | 2018-01-19 17:39:27 | ||||||
cashout_time | 1969-12-31 23:59:59 | ||||||
total_payout_value | 0.036 HBD | ||||||
curator_payout_value | 0.008 HBD | ||||||
pending_payout_value | 0.000 HBD | ||||||
promoted | 0.000 HBD | ||||||
body_length | 260 | ||||||
author_reputation | 3,338,376,561,587 | ||||||
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" | ||||||
beneficiaries |
| ||||||
max_accepted_payout | 1,000,000.000 HBD | ||||||
percent_hbd | 10,000 | ||||||
post_id | 29,054,573 | ||||||
net_rshares | 5,978,315,457 | ||||||
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
jjb777 | 0 | 5,978,315,457 | 100% |
Old habits die hard :) Especially since most are going from Windows->Linux I didn't want to get into much detail on changing ports and fail2ban as it is a bit more work. Most users who change ports with fail2ban fail to properly configure it for the new port and it just sits there protecting a port not even being used.
author | themarkymark |
---|---|
permlink | re-jjb777-re-themarkymark-2018112t183921795z-20180112t190346846z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 19:03:42 |
last_update | 2018-01-12 19:03:57 |
depth | 2 |
children | 0 |
last_payout | 2018-01-19 19:03:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.036 HBD |
curator_payout_value | 0.012 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 323 |
author_reputation | 1,774,088,473,727,210 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,069,149 |
net_rshares | 6,630,790,017 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
jjb777 | 0 | 6,630,790,017 | 100% |
great tutorial @themarkymark! I love SSH Public Key Authentication. It's the first thing I do when setting up a new linux system. I did it so many times I just have a bash script that modifies all the ssh settings and installs my public key. I've never seen the distinction between ed25519 and rsa, I'm going to have to do some more reading on that. I've always just used a high key length rsa algorithm for my keys. Thanks for bringing that to my attention, I now know what I'm spending my weekend reading about!
author | kslo |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t191738067z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"users":["themarkymark"],"app":"steemit/0.1"} |
created | 2018-01-12 19:17:36 |
last_update | 2018-01-12 19:17:36 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 19:17:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 519 |
author_reputation | 574,428,101,189 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,071,432 |
net_rshares | 0 |
Wow!!!. , i like your post. i wait for your next post , carry on . all the best
author | luckyboy786 |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t173412685z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 17:34:12 |
last_update | 2018-01-12 17:34:12 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 17:34:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 80 |
author_reputation | -67,869,236,239 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,053,668 |
net_rshares | 0 |
Very useful information you shared.
author | maamirh |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180120t080716500z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-20 08:07:18 |
last_update | 2018-01-20 08:07:18 |
depth | 1 |
children | 0 |
last_payout | 2018-01-27 08:07:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 35 |
author_reputation | 25,877,254,061 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 30,811,283 |
net_rshares | 0 |
When I did this with @ginabot's server after your recommendation, i had to search each step on Google... It went alright but to have a comprehensive tutorial like this in hand can speed up my next server setup for sure :) Thank you!
author | neander-squirrel |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t171708624z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"users":["ginabot"],"app":"steemit/0.1"} |
created | 2018-01-12 17:17:12 |
last_update | 2018-01-12 17:17:12 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 17:17:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.610 HBD |
curator_payout_value | 0.199 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 232 |
author_reputation | 416,506,081,655 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,050,388 |
net_rshares | 102,724,024,939 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
themarkymark | 0 | 102,724,024,939 | 50% |
I knew you were watching my computer! Thanks for the advice, I will be using this.
author | nicnas |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t180952988z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 18:09:48 |
last_update | 2018-01-12 18:10:33 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 18:09:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 82 |
author_reputation | 38,554,121,369,241 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,059,988 |
net_rshares | 0 |
Very thorough and technical. I will be referring to this as a resource. Thanks @themarkymark
author | nwjordan |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t170231954z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"users":["themarkymark"],"app":"steemit/0.1"} |
created | 2018-01-12 17:02:30 |
last_update | 2018-01-12 17:02:30 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 17:02:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 92 |
author_reputation | 6,611,889,961,557 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,047,526 |
net_rshares | 0 |
A great primer, resteeming.
author | personz |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t181411000z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 18:14:09 |
last_update | 2018-01-12 18:14:09 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 18:14:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 27 |
author_reputation | 42,452,361,038,560 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,060,755 |
net_rshares | 0 |
Nice post. Should actually implement this to our linux machines at work. You can never be safe enough.
author | pieter87 |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180114t212608484z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-14 21:26:09 |
last_update | 2018-01-14 21:26:09 |
depth | 1 |
children | 0 |
last_payout | 2018-01-21 21:26:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 104 |
author_reputation | 756,077,106,384 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,552,023 |
net_rshares | 0 |
This assumes `sudo` is the group that gives `sudo` access. This isn't the case on every linux distribution. Some use `wheel` or `admin` To ensure use of `sudo` group do the following after step 2 **Update Packages** 1. visudo 1. Add ```%sudo ALL=(ALL:ALL) ALL```
author | r351574nc3 |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180706t111744164z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-07-06 11:17:42 |
last_update | 2018-07-06 11:17:42 |
depth | 1 |
children | 2 |
last_payout | 2018-07-13 11:17:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.081 HBD |
curator_payout_value | 0.022 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 266 |
author_reputation | 169,747,269,306,049 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,644,707 |
net_rshares | 52,576,169,544 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
salty-mcgriddles | 0 | 42,891,564,949 | 100% | ||
exifr | 0 | 4,150,431,262 | 100% | ||
exifr0 | 0 | 5,534,173,333 | 100% |
> These steps are what I do with every server I own or work with. All my servers are Debian based (mostly all Ubuntu at this point) so these commands will be for Ubuntu.
author | themarkymark |
---|---|
permlink | re-r351574nc3-re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180706t112545925z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-07-06 11:25:45 |
last_update | 2018-07-06 11:25:45 |
depth | 2 |
children | 1 |
last_payout | 2018-07-13 11:25:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 169 |
author_reputation | 1,774,088,473,727,210 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,645,481 |
net_rshares | 0 |
That's not necessary, I was pointing information that would be useful for users of other distributions.
author | r351574nc3 |
---|---|
permlink | re-themarkymark-re-r351574nc3-re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180706t125816431z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-07-06 12:58:15 |
last_update | 2018-07-06 12:58:15 |
depth | 3 |
children | 0 |
last_payout | 2018-07-13 12:58:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.077 HBD |
curator_payout_value | 0.022 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 103 |
author_reputation | 169,747,269,306,049 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,655,193 |
net_rshares | 50,549,733,585 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
salty-mcgriddles | 0 | 41,175,902,351 | 100% | ||
exifr | 0 | 4,075,872,617 | 100% | ||
exifr0 | 0 | 5,297,958,617 | 100% |
I think a safer approach would be: 1. Change root password 1. Update Packages 1. Admin Account Setup 1. Create New User 1. Add new user to sudo group 1. Test login and sudo 1. Disable root login 1. Test ssh configuration with `sshd -T` 1. SSH Key Setup 1. Create SSH Key 1. Install SSH Key for new user 1. Test SSH Key authentication 1. Disable password authentication 1. Test ssh configuration with `sshd -T` 1. Restart sshd This breaks up **Disable root login & password authentication** into separate steps because it is safer. Instead of a kill switch at the end, vulnerabilities are removed in a sequence. First, a user is created and login to the user with sudo is tested and verified working. Then root logins are disabled. Next, key setup is handled along with disabling password logins.
author | r351574nc3 |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180706t112615398z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-07-06 11:26:15 |
last_update | 2018-07-06 13:56:09 |
depth | 1 |
children | 5 |
last_payout | 2018-07-13 11:26:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.072 HBD |
curator_payout_value | 0.019 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 836 |
author_reputation | 169,747,269,306,049 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,645,532 |
net_rshares | 46,635,476,070 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
salty-mcgriddles | 0 | 37,989,671,812 | 100% | ||
exifr | 0 | 3,752,785,153 | 100% | ||
exifr0 | 0 | 4,893,019,105 | 100% |
I do the process in less than five minutes. If I can log in via the SSH key, I don't have to worry about the password authentication, nor do I care about it as it is being disabled. The entire time I have failbacks: * root login is still enabled until the final step * initial root login session is still connected * I have tested user login with key and sudo command functionality I see no problems doing it all at once, especially since it's done very quickly and the final test will verify everything and nothing is locked down until that is completed.
author | themarkymark |
---|---|
permlink | re-r351574nc3-re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180706t113308887z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-07-06 11:33:06 |
last_update | 2018-07-06 11:33:24 |
depth | 2 |
children | 4 |
last_payout | 2018-07-13 11:33:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 558 |
author_reputation | 1,774,088,473,727,210 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,646,203 |
net_rshares | 0 |
> I do the process in less than five minutes. I'm glad you can. I was making the suggestion for others that want to attempt this that find it's an easier to troubleshoot process. It's a miniscule change since this process is unchanged with the exception of disabling root sooner. It's literally one extra step and not a big one.
author | r351574nc3 |
---|---|
permlink | re-themarkymark-re-r351574nc3-re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180706t132346969z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-07-06 13:23:45 |
last_update | 2018-07-06 13:23:45 |
depth | 3 |
children | 3 |
last_payout | 2018-07-13 13:23:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.077 HBD |
curator_payout_value | 0.021 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 330 |
author_reputation | 169,747,269,306,049 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,657,921 |
net_rshares | 49,638,656,091 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
salty-mcgriddles | 0 | 40,440,618,381 | 100% | ||
exifr | 0 | 4,001,313,971 | 100% | ||
exifr0 | 0 | 5,196,723,739 | 100% |
awww crap - more sysadmin work to learn - i bookmarked this one - now to fire up a dummy vm and make sure I can do it - then move on to production server ;)
author | rxhector |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t183523142z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 18:36:36 |
last_update | 2018-01-12 18:36:36 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 18:36:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 156 |
author_reputation | 20,310,242,279,674 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,064,656 |
net_rshares | 0 |
Thank you for sharing this.
author | steemthat |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t184546098z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 18:45:39 |
last_update | 2018-01-12 18:45:39 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 18:45:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 27 |
author_reputation | 1,483,266,589,954 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,066,188 |
net_rshares | 0 |
Isn't the root user locked by default in Ubuntu?
author | street.yoga |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180309t202136007z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-03-09 20:21:45 |
last_update | 2018-03-09 20:21:45 |
depth | 1 |
children | 3 |
last_payout | 2018-03-16 20:21:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 48 |
author_reputation | 2,738,791,069,636 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 43,392,309 |
net_rshares | 0 |
not on most VPS/Dedicated servers.
author | themarkymark |
---|---|
permlink | re-streetyoga-re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180309t205241365z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-03-09 20:52:39 |
last_update | 2018-03-09 20:52:39 |
depth | 2 |
children | 2 |
last_payout | 2018-03-16 20:52:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 34 |
author_reputation | 1,774,088,473,727,210 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 43,396,267 |
net_rshares | 0 |
Right, I have set up dozens on my own, and used Mittwald lately, must have escaped my attention then, but now that you mention it, I remember that Hetzner had root logins, I still get goosebumps from that time when I was told to leave it that way :) Thanks.
author | street.yoga |
---|---|
permlink | re-themarkymark-re-streetyoga-re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180309t212203437z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-03-09 21:22:03 |
last_update | 2018-03-09 21:22:03 |
depth | 3 |
children | 1 |
last_payout | 2018-03-16 21:22:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 257 |
author_reputation | 2,738,791,069,636 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 43,399,929 |
net_rshares | 0 |
Very well put. I think I put pull it off. I'm not sure when I'll going to try it.
author | teamsteem |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t193653978z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 19:36:51 |
last_update | 2018-01-12 19:36:51 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 19:36:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 81 |
author_reputation | 284,804,541,406,803 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,074,500 |
net_rshares | 0 |
Very informative post. Its a great help and knowledge sharing. Thanks for sharing this post.
author | thedawn | ||||||
---|---|---|---|---|---|---|---|
permlink | re-themarkymark-2018112t222550103z | ||||||
category | sysadmin | ||||||
json_metadata | {"tags":["sysadmin","security","linux","witness-category","witness"],"app":"esteem/1.5.0","format":"markdown+html","community":"esteem"} | ||||||
created | 2018-01-12 17:27:48 | ||||||
last_update | 2018-01-12 17:27:48 | ||||||
depth | 1 | ||||||
children | 0 | ||||||
last_payout | 2018-01-19 17:27:48 | ||||||
cashout_time | 1969-12-31 23:59:59 | ||||||
total_payout_value | 0.000 HBD | ||||||
curator_payout_value | 0.000 HBD | ||||||
pending_payout_value | 0.000 HBD | ||||||
promoted | 0.000 HBD | ||||||
body_length | 92 | ||||||
author_reputation | 18,112,689,713,612 | ||||||
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" | ||||||
beneficiaries |
| ||||||
max_accepted_payout | 1,000,000.000 HBD | ||||||
percent_hbd | 10,000 | ||||||
post_id | 29,052,543 | ||||||
net_rshares | 0 |
Thanks for this great tutorial, and the heavy detail for the technically illiterate...like myself. > As ridiculous as it looks, you will never need this password except in extreme emergencies. Using a good password manager will make this an easy process. Sorry if I missed this somewhere...what password manager do you recommend?
author | trending |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t202127826z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 20:21:24 |
last_update | 2018-01-12 20:21:24 |
depth | 1 |
children | 0 |
last_payout | 2018-01-19 20:21:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.332 HBD |
curator_payout_value | 0.108 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 331 |
author_reputation | 3,529,170,665,631 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,082,097 |
net_rshares | 55,899,194,852 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
trending | 0 | 55,899,194,852 | 100% |
Super helpful post! One quick thing, the command to generate the SSH key has a typo, you put 'ad25519' instead of 'ed25519'.
author | yabapmatt |
---|---|
permlink | re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t192708903z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 19:27:09 |
last_update | 2018-01-12 19:27:09 |
depth | 1 |
children | 3 |
last_payout | 2018-01-19 19:27:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.369 HBD |
curator_payout_value | 0.120 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 124 |
author_reputation | 160,224,638,135,630 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,072,966 |
net_rshares | 62,108,769,884 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
themarkymark | 0 | 62,108,769,884 | 30% |
Thanks! I can't tell you how much I hate editing / writing posts on Steemit, it is so laggy and Grammarly makes it virtually impossible to read due to some quirky stuff going on with their forms. Only site I have ever had problems with it.
author | themarkymark |
---|---|
permlink | re-yabapmatt-re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180112t202159797z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"app":"steemit/0.1"} |
created | 2018-01-12 20:21:57 |
last_update | 2018-01-12 20:21:57 |
depth | 2 |
children | 2 |
last_payout | 2018-01-19 20:21:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 240 |
author_reputation | 1,774,088,473,727,210 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,082,204 |
net_rshares | 0 |
Atom, emacs, and vim have preview modes for markdown that include checkers. I like to use external editors because then it gives me an excuse to use `git` to version control my posts. Next evolution is to post to steemit directly from `git` (See https://github.com/r351574nc3/docker-git-steem-bot)
author | r351574nc3 |
---|---|
permlink | re-themarkymark-re-yabapmatt-re-themarkymark-how-to-properly-setup-ssh-key-authentication-if-you-are-logging-into-your-server-with-root-you-are-doing-it-wrong-20180706t110628245z |
category | sysadmin |
json_metadata | {"tags":["sysadmin"],"links":["https://github.com/r351574nc3/docker-git-steem-bot"],"app":"steemit/0.1"} |
created | 2018-07-06 11:06:27 |
last_update | 2018-07-06 11:06:27 |
depth | 3 |
children | 1 |
last_payout | 2018-07-13 11:06:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.084 HBD |
curator_payout_value | 0.023 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 299 |
author_reputation | 169,747,269,306,049 |
root_title | "How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,643,611 |
net_rshares | 54,801,428,557 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
salty-mcgriddles | 0 | 44,607,227,547 | 100% | ||
exifr | 0 | 4,423,812,962 | 100% | ||
exifr0 | 0 | 5,770,388,048 | 100% |