A terrible way to jump into colocating your own stuff
rachelbythebay.com
rachelbythebay.com
Also, test that it's properly disabled with something like `ssh -v yourserver : 2>&1 | grep continue`, because there are a surprising number of ways for that to go wrong (did you know that sshd lets you Include multiple config files together in a way that can override the main one? I know that now.)
Fwiw I don't think SSH adds the include line upstream. Most distros add it now.
The problems I hit with using Linux for this were different ten years ago, but, based on this thread, things got worse on that side of the fence.
it seriously bothered me that an update automatically re-enabled password authentication. i ended up switching to a different OS.
Find a dedicated server provider and rent the hardware. These companies rent some part of the datacenter (or sometimes build their own). Bonus points if they offer KVM - as in remote console, not the Linux hypervisor. Also ask if they do hardware monitoring and proactively replace the failed parts. All of this is still way cheaper than cloud. Usually with unmetered networking.
Way less hassle. They'll even take your existing stuff and put it into the same rack with the rented hardware.
The difference from cloud, apart from the price, is mainly that they have a sales rep instead of an API. And getting a server may take a from few hours to a few days. But in the end you get the same SSH login details you would get from a cloud provider.
Or, if you really want to just collocate your boxes, the providers offer "remote hands" service, so you can have geo-redundancy or just choose a better deal instead of one that's physically close to your place.
I used to have a short list of trustworthy companies like this I'd recommend to clients ~20 years ago when doing consulting. I think 3/4 of them have been gobbled up by private equity chop shops or are just gone.
Nowadays noone gets fired for going with AWS, or resold AWS with a 100% markup from a 'private enterprise cloud' provider.
And for a lot of startups it really makes sense to use AWS. But if you do something resource or bandwidth intensive (and I'm not even talking about Llama now), the costs add up quickly. In our case, switching to AWS would increase our costs by an equivalent of 4 - 8 devs salaries. After AWS discounts. That's a hard sell in a 15-person team even though half of our infra costs already are with AWS (S3).
Gradually shift workloads, leaving anything requiring super-high durability last (optionally keeping S3, or competitors, as a backup storage option) as getting durability right is one of the more difficult things to get confidence in and most dangerous ones to get wrong.
Wrapping S3 with a write-through cache setup can often be the biggest cost win if your egress costs are high. Sometimes caching the entire dataset is worth it, sometimes just a small portion.
The compute and network heavy stuff we do is still out of AWS.
Sounds like (unlike most people who use AWS) you've done your homework. It's great to see. I've used AWS a lot, and will again, because it's often convenient, but so often I see people doing it uncritically without modeling their costs even as it skyrockets with scale.
Is there an off the shelf implementation of this?
Heck, even confirming that one has uploaded one's files correctly is difficult. You can extract MD5 (!) signatures from most object storage systems, but only if you don't use whatever that particular system calls a multipart upload. You can often get CRC32 (gee thanks). With AWS, but not most competing systems, you can do a single-part upload and opt into "object integrity" and get a real hash in the inventory. You cannot ask for a hash after the fact.
I understand why computing a conventional cryptographically-secure has is challenging in a multipart upload (but that actually all that bad). But would it kill the providers to have first-class support for something like BLAKE3? BLAKE3 is a tree hash: one can separately hash multiple parts (with a priori known offsets, but that's fine for most APIs but maybe not Google's as is), assemble them into a whole in logarithmic time and memory, and end up with a hash that actually matches what b3sum would have output on the whole file. And one could even store some metadata and thereby allow downloading part of a large file and proving that one got the right data. (And AWS could even charge for that!)
But no, verifying the contents of one's cloud object storage bucket actually sucks, and it's very hard to be resistant to errors that occur at upload time.
drive to a few, and shake some hands. in my exp, the difference between colos is usually "actual SOC2/ISO compliance" on one side, and "there are no locked doors between the parking lot and my rack" on the other, with not much in-between that's not for some specialty (radio), and these things can only really be seen for yourself
Ideally, there’d be locked doors, and the data center wouldn’t be subsidizing performative checkboxing.
I'd rather see open ended red team pentest reports.
Positive indicators would be talking to employees and getting an idea of organizational clue level. There are no shortcuts here I’ve ever found beyond doing this sort of old fashioned “know your vendor” style work.
More important than raw uptime.
The boundary where colo and dedicated server offerings intersect in price tend to be down to land and power costs - Hetzner finally became the cheaper option for me as London land values skyrocketed relative to their locations in Germany, and colo prices with them. (We could have looked at coko somewhere remote, but the savings would've been too low to be worth it)
If you do happen to have a system without on-board KVM, check out NanoKVM, which is a cheap (~$40) option for an add on KVM. It's rather more affordable than PiKVM. https://github.com/sipeed/NanoKVM
There was a single security guard, I signed in and he gave me directions and a big keychain. The keys opened most of the rooms and most of the cages around the racks. To this day I remain mystified at the level of trust (or nonchalance) that security guard had in a spotty teenager.
Quite a few of us in that era were juggling it with being students, so it wouldn't surprise me if the security staff were used to it and expected you to look young enough to be their kid!
Actual criminal? Society will bend over to accommodate you.
To this day I can get into pretty much any rack or room I feel like at datacenters everyone here has heard of. It just takes experience these days and a bit of charm. Plus having a million keys and staff rack combination codes doesn't hurt. These were freely given and simply added to my collection over time, nothing stolen or social engineered.
I've never done anything nefarious with these abilities, and no one I know has either. It's simply a matter of practicality when you staff a 150,000 square foot facility with 2 security guards who have no idea what they are doing.
If I (and many others) had wanted to, we could have caused multi-week/month outages you'd be reading about on the news with 5 minutes of effort. This is basically the status quo for any sensitive industry.
The world turns because 99.9999% of people want to give you a hug vs. hit you. Society falls when that ratio goes much lower.
Deliveries are only received under the supervision of a DC employee (or received directly by a DC employee) and must go through a lock to enter the building. No extern (delivery person or w/ever) is allowed in (if somebody sneaks into the lock, the guard never opens the second door obviously).
The biggest weakness imo (but still requires a bit of insider access, so it's not completely out in the open for anybody to exploit) is that the registration process for new access requests seems fairly weak security-wise. It's usually a simple email from the client to the DC provider with the date of the intervention and the identity of the person. Will the DC provider notice if the access request is sent from a spoofed domain? or from a legitimate domain but by another person than the one who's accredited to issue access requests? Will they notice if the person who shows up for the intervention has a fake ID?
With my director's unofficial approval I was allowed to _try_ to enter the datacenter. So I just walked very confidently towards the entrance, nodded to the security guard like all of the regulars who didn't bother showing their badges, and he let me in.
" 1. Install Linux on the box. Turn everything off but sshd. Turn off password access to sshd. If you just locked yourself out of sshd because you didn't install ssh keys first, STOP HERE. You are not ready for this. "
If you blindly followed the directions and got locked out, you can do exactly the same thing with other directions. You were not ready.
Le sight.
Good instruction will tell you why and the consequences of missing a step. Perhaps some options.
But perhaps I want too much, the title does include the word "terrible," after all.
That’s a strong indicator you won’t be able to support the setup moving forward. What if apt wedges some firewall rule, or the machine starts OOMing?
Or your user database full of PII gets popped.
Or your html/css/javascript gets modified to send all your supposedly secure Stripe checkout credit card details to eViLHackerz.ru
(Or your unmetered 1GBit network connection gets used to host p0rn or stage attacks for Mossad on hospitals and water utilities and power stations...)
Seriously. Not knowing or remembering abut ssh keys is way below the minimum baseline of skills that are needed to manage a server connected to the internet.
Managing colo-ed servers when you're only just experienced enough to know about and know how to set up ssh keys without being told _is_ a terrible idea.
What is the reason NOT to educate me about SSH keys instead of just telling me to go home?
Everyone has to start somewhere.
Go home, from the colocation idea.
Start with way less expensive VMs from your choice of hyperscaler or el-cheapo-vms.com, or in a homelab with old hardware or RasPi/IntelNUC type devices.
If you "need" colocation, you need someone who knows what they're doing to set it up and maintain it properly.
Or just go ahead and wing it. Maybe I'm wrong. Maybe Rachel's wrong. Maybe you're "The One".
There's just nothing wrong with adding a few steps to do your keygen, upload your public key, save your private key on a thumb drive or whatever, and so on. Please, tell me why that should NOT be added to a tutorial. Whom does it harm? What is the downside?
I can't see anything but Crappy Gatekeeping, but please, come up with a decent reason not to add just a few more instructions.
(Although now, apparently, keys are out for some folksand certs are coming in vogue. Who knew?)
This isn't about ssh keys specifically, it's using ssh keys as a canary - an example of a thing someone who has internalised enough Linux sysadmin and security knowledge will automatically get right. It's shorthand for all the other hundreds of things that need doing to properly secure a public internet connected Linux machine.
This is a way bigger thing that adding a few lines explaining ssh keys.
Perhaps firewall config has also "slipped you mind"? Or TLS certs and renewals? Or shutting down unneeded service started by your distro? Or managing logfiles? Or monitoring disk space/memory usage/cpu usage? Or keeping your JVM/Nodejs/Python/PHP/whatever up to date with security patches? Or maintaining your software BOM and all the security update notification channels for everything you're running whether you installed it ir whether it got bundled in as a dependancy of something else you installed? (Think zx or Log4J)
Or maybe's since you're just "rusty", you're looking for all the sysvinit files you remember being important, not realising your chosen distro now uses systemd. Or your previous experience was on machines from before the era of speculative execution attacks, or from when it was considered acceptable to hash passwords using crypt or MD5?
I don't know when you were doing colo servers while ssh keys "were not in vogue". In the late 90s I was flying annual round the world trips to visit our colo facilities in London, New York, and San Francisco - with half a dozen hard drives in my luggage because replacing raid1 arrays was a better/cheaper solution for us than uploading over our available bandwidth over 56k modems or ADSL. All those machines had ssh keys. It was standard practice.
But yeah, maybe you're right and my 30 years experience and hard earned advice is just "gatekeeping". Same with Rachel the article author's decades of experience (at way higher levels than mine). I'm sure that your assertions of it being "Incorrect. Wildly incorrect" is not another one of the things that've slipped your mind or that you're a bit rusty on. Feel free to assume that having ssh keys "slip you mind" doesn't mean you have a lot to learn (or relearn) before being capable of securely/professionally managing a colo-ed server.
(This was my path. This may not be yours.)
If you want to start somewhere, start from the machine you already have: Your PC.
Work up to using a VPS. A DigitalOcean droplet or a Hetzner VPS, or any other provider.
Learn how to generate public-private keypairs. PuTTY comes with a tool to do this (puttygen.exe). Otherwise, learn how to use ssh-keygen.
Learn how to move your private key securely to the VPS. Learn how to disable password logins to your VPS, & moving the SSH port to anything > 10000.
Do this for multiple VPSes.
I suspect the point of this article isn’t meant to be a Linux 101 guide, but rather, specifically about their learnings with how to go about colocating a linux server.
> But perhaps I want too much, the title does include the word "terrible," after all.
To be fair, it’s not actually a particularly good guide to how to go about getting your first colo server setup either, which aligns with their title about it being terrible.
First, open two superuser terminals. The second one is so if you fuck up the sudoers format so it doesn't parse and you accidentally 'exit' one too many times in the first terminal.
"visudo edits the sudoers file in a safe fashion..."
If your server/device has an IPMI... get a PiKVM (or like) anyways. Not only will you last more than 2 seconds without being hacked but it'll have more functionality and be much faster.
If you're in the US there are lots of places in the Kansas City area that have ridiculously cheap pricing and it's decently centrally located in the country.
Thanks, I had never heard of PiKVM!
TinyPilot's compare and contrast point of "To exercise the full functionality of PiKVM, users must install a custom circuit board on top of their motherboard and re-route their power supply's ATX pins." is a complete farce (it's not required) and worded in an intentionally scary way (the only reason TinyPilot doesn't have this requirement it doesn't offer the feature while PiKVM does). The "custom circuit board" is literally a PCB that, optionally, allows you to jumper the inline the remote power controls in a way that the normal power buttons still work too rather than rely on ACPI signalling over USB.
It honestly makes my blood boil to see this underhanded approach works so well... the TinyPilot device is good though, as are some other options. Just keep in mind if you opt to go with ACPI only remote power controls via USB things may still go bad if your system hangs/crashes/gets in a weird power state whereas plugging in the wires to the PiKVM will be no different than holding the power button.
I gladly do, and it's the best hosting experience I've had so far, and I used to have rented dedicated iron from Server4You, Hetzner, Webtropia and the like from 2005 on. Maybe there's a similar hidden gem in the area you live in, and you just do not know about it? :) Mine flew under my radar for nearly 20 years, and even though I knew they existed, I was not aware they'd colo other peoples' boxen at very fair rates.
The author of the post seems to be living in the bay area. It's easy when the number of nerds per km² is high, disposable income is even higher, and driving a car for 2 hours is considered "next door".
I think for losers like myself, living in the middle of nowhere with low disposable income, the best solution is just to rent out a dedicated Kimsufi box (from OVH), or a server off the Heztner auctions. (Or whatever is the equivalent in North America) It's much much more cost effective than collocating.
i remember the look in the admin's eyes when they asked "alright, what kind of hardware are you looking to install?" and I said "oh i have it right here" and pulled two Intel NUCs out of my backpack
> Consider bringing a screwdriver and a flashlight (any halfway decent place will provide those for you, but you never know).
two multitools minimum, sometimes you need to hold a nut with one while loosening the bolt with the other
the best space is the one that is right next to a Frys/Microcenter/whathaveyou
NUCs would be like nirvana after some of the jerry-rigged crap I've seen dragged into facilities. Maybe I'd like them to have a secondary power supply, but then again you had two, but they'd make a fantastic little router for something not too traffic heavy. Lots of utility use cases for something like that in a proper facility.
yup! it was cheaper to bring two NUCs than try to get N+1 power redundancy set up for "atypical" (not u-rack) systems :)
then they started making 1U NUC rack mounts...
> Plug everything in and turn it on.
Most server racks will have C13 or C19 outlets for power distribution. For consumer-type devices designed to plug into a wall socket, suitable cables or an adapter strip would probably be required.
For example, in ZFS you can mirror disks 1 and 2, while having 3 and 4 as hot spares with:
zpool create pool mirror $d1 $d2 spare $d3 $d4Also remember ask your provider to assign you a private vlan and vpn to it for your own access only.
Well, we could run decentralized systems at home for SMEs/Startup common needs from modern homes of remote workers, just renting them a room with proper local equipment the modern remote worker probably already have (VMC, A/C, "the big UPS" from domestic p.v.) with not much more expenses than using someone else computer also named "the cloud". Then if/when needs mount some sheds with p.v. + local storage and good connections can pops up. Who need a CDN in such setup? Then/if a real small datacenter could born.
Are you horrified? Well, now try to see the recent history, when Amazon choose not to buy expensive and reliable SUN servers choosing cheap and crappy PCs or Google choose to save money with rackmounted velcro-assembled PCs with a built-in UPS, i.e. a naked velcro strapped one. See the history of buying cheap low quality ram because we have ECC, lo quality storage because we have checksums anyway and so on. Then think about some real recent datacenter fires and what they told about "how brilliant and safe" was their design.
Long story short: as we ditch big iron in the past, we ditch mainframes, it's about time to think ditching dataceter model as well for a spread set of small unreliable but many machine rooms at homelabs scale. This, like FLOSS gives us reliability, cheapness and ownership as well. This ALSO decouple hw and sw giants, witch is a very good things in terms of free markets. It will also force he OEMs to be flexible in their design and ditching slowly from modern crappy fats-tech also some giants deprecate [2] as unsustainable, for more balanced tech because well, such homelabs last much longer than typical ready-made PCs and craptops or NAS from the mass distribution market.
[1] buying from China directly instead of feeding local importers who skyrocket the price instead of lowering it when Chinese supplier lower them
[2] https://unctad.org/system/files/official-document/der2024_en... of course suggesting the wrong answer
But yes, if you think you might want to add other machines later, preemptively putting a switch in there will make it tons easier.
When you have a better handle on what works for you, then go with colo (meaning you don't rent servers, but buy and setup your own servers and Ethernet switches, that go into your rack space).
The "clowns" are annoying as hell in their costs and dominance of CIOs, but there are distinct advantages of experimentation in clouds. Um, as long as it isn't your credit card...
As this document focuses on keeping things simple, they don't have the isolated network / VPN needed to use IPMI.
But ipmi cards are little network-attached linux boxes which run prehistoric kernels and userspace, exposing as many services as the half-wits who put together the firmware image can shovel in, and are rarely if ever patched by the vendor unless there's some really public scandal.
The standard thing to do is to isolate them on some kind of private management network in an attempt to shield the wider internet from the full majesty of the firmware engineers' dazzling skills, but that might be harder to do in the simple 'beginner' scenario Rachel describes.
One good simple version when you get up to two servers instead of just one is to cross-connect so each machine has ipmi access to the other, but neither ipmi service is exposed to the wider world.
I bet your provider has something like that. It's a godsend when you screw up, say, the hypervisor running state somehow and need bare metal access to unbork it :)
But I expect you're probably right some or all of the providers we use do have something like that, as I speculated in the previous post. I've just never understood the point of vga-type stuff when bios/uefi serial redirect exists and serial console is more convenient anyway once the kernel has started, so never asked the question.
I've often wondered about actually replacing the kernel and userspace on the vendor BMCs themselves, to substitute something more competent, but I've not found anyone who's successfully done it.
The equipment is all Dell with Enterprise DRAC, which is 90+% of my remote power needs. The only times I've needed to physically unplug them I also needed the power button on the machine held down for 30 seconds as part of what Dell calls the "FLEA drain" process, so remote power strips wouldn't help.
https://ussignal.com/uploads/general/Grand-Rapids-East-Data-...
I haven't rented any space in a while but I'm going to assume $400/month is about the cheapest that you would be able to get a half a cabinet.
And of course, that depends on how much bandwidth you need, how much power you need, are you running top-tier connectivity or something like Cogent/he.net...
1U rack space, including power, a 1Gb network uplink, and at least 1 dedicated IPv4 IP, is going to be at least $60-80/month, and even that would from small discount colo providers you have never heard of.
I guess I could leave them here at home and probably pay less in power than the total colo cost, but the bandwidth here at home is not great.
I know, I have one in the DC.
If they aren't packed there are probably some other options, more performant and having more storage now.
HE will give you a full cabinet for $600/month https://he.net/colocation.html?a=707336661752&n=g&m=e&k=hurr...
Don't do what I did and put a Cisco router on a remote mountaintop radio site with the config register still set to 0x2142, and then go home.
And if you failed to do this and all advices in the article: then kindly ask colo provider to attach ip-KVM (if your "server" is not actual server with ipmi/bmc), 99.9% of places have these. And most of them will provide it free of charge for limited amount of time.
Your house will have one connection to the outside work, the DC should have multiple for redundancy (In case a digger goes through your network connection), and same for power any good DC will have their own redundant power supplies (Batteries, generators etc).
And if your server is serving a lot of traffic, your consumer home ISP might not be too happy about it. Theres a reason they split plans between home and business.
Not really a serious argument, but maybe worth looking at this these days. Mostly because I think as engineers we all have the desire to hit 100% uptime and reliability when in a lot of cases "close enough" might be a lot further than you think.
On the power end, a lot of people are getting to some form of local generation and storage (e.g., solar + batteries). Small backup generators aren't entirely unheard of. And on the network end, I'm probably not the only person that went to multiple connections when my ability to earn income became tied to my ability to be online from home.
As it sits right now, my power's not the most reliable in the world but because of that I already have a fair sized generator and a lot of fuel stored on-site (~5 days of gasoline, ~10 days of propane). I'm directly off of a fairly regionally important power line, so I'm usually fairly high up on the priority list during any major outage. (I mean, not "hospital" but if my power's out so are tens of thousands of others generally.) My grid power's rarely out for that long, and my local power even less since I have the generator. If I finally got around to adding some solar and storage to bridge between grid going down and the generator firing up I'd be able to pretty comfortable ignore power outages for over a week before I started needing to worry about making trips out to dump fuel in the generator or calling for some propane.
As far as connectivity, I've got three connections across two providers. All my traffic hits a real data center first so I can bond the connections (because residential) then flows to and from my house. One of the providers is wireless so the only single point of failure for cut lines is a few feet in front of my router.
I'm well aware this gets nowhere close to the reliability of a data center. I wouldn't run anything safety or life critical this way. I wouldn't run anything making a substantial amount of money this way. But there's a lot of stuff that fits in below "successful SaaS" and "life critical" that I think could tolerate an hour of downtime here or there that would get along just fine like this. And even if you think "well, you're clearly an insane person no one else is going to do that" I think there's still lots yet that could tolerate a day or two of downtime every year or two just fine. There are a lot of smaller services out there that businesses rely on that are hosted in AWS but aren't much more reliable than if they were running in someone's basement and they survive just fine.
- If you want to send email from your server, you'll have a higher chance of it ending up in spam folders because of the residential IP.
- Home ISPs don't have SLAs. Your network was down for half a day without warning? Oh well. Things happen. We're sorry.
- Same goes for power, it's not as guaranteed at home as it is in a datacenter. Even if you install a UPS for your server, you can't be sure that the ISP's equipment will also work if you lose power.
Frequent IP changes and the residential IP block could make mail hard.
If I was looking to host something that mattered, and was a little more public, I would move that more for my own sanity. Not being able to find me via IP, network uptime guarantees, more robust backup power, etc.
If you were some cloud admin and put your website on a resume or something, and it was down, I might use that to jump to conclusions.
RIP Alchemy.
This was a tortured way to setup a colo. I bring rackable gear, no switch, and use the colo's "setup station" to do final config, then I rack the sucker. They can always VLAN me and my laptop together somewhere for a final check before I leave. I'd be worried if they couldn't.
Also you could see if your local hackers space has a server rack