News for hackers. Stuff that matters.
Re:How to properly manage SSH keys for server access by gabereiser on Saturday September 26, 2020 @05:38PM (#24602366)
>Every developer needs access to some servers for example to check the application logs.

I fundamentally disagree with this. I’ve been writing software a long time and I used to demand I have server access so I can tail logs, creating the problem this article talks about resolving (good read btw). But I can’t help but wonder why we keep teaching this mindset. We have log analysis tools available on pretty much every cloud now. Docker has an aws log driver, a gcp log driver... etc. Backend developers should make a conscious decision on how to ship log events out of the box and into something searchable, indexable, and can derive metrics from. I ran a cloud infrastructure group that vehemently said “No” to any dev requesting ssh access. Not because they couldn’t, but because we don’t have access either. We created our platform without the ability to modify it. Infrastructure as code. Only way is to redeploy the stack. You’d be surprised at how much less stress there is when you can have alerts on log events from your application when things break instead of a support call or a support ticket. Proactive > Reactive debugging. I also understand not all shops are at that level of maturity. I’d love it if the community as a whole stopped teaching people to treat their app and server as a second home, as a pet, that must be nurtured. Obviously these are my opinions and the article itself addresses how to handle ssh keys for server access in a logical way, my only issue is why create that mess in the first place?

Re:How to properly manage SSH keys for server access by kyran_adept on Saturday September 26, 2020 @06:42PM (#24602750)
What if you encounter an nginx bug, or a kernel bug? At some point, when you reach a low enough level you will need some deeper investigation tools and finally access to the machine to get enough data and fix the problem.
Re:How to properly manage SSH keys for server access by hnlmorg on Saturday September 26, 2020 @07:21PM (#24602921)
Then that would be a sysadmin / DevOps responsibility rather than your application developers. Or at least you'd have those guys involved with the investigation.

But honestly, how often is a web applications bug due to a kernel bug?

Re:How to properly manage SSH keys for server access by closeparen on Saturday September 26, 2020 @10:10PM (#24603646)
a) How can there be a "DevOps responsibility rather than your application developers"? Isn't the whole idea of the word "DevOps" to eliminate such distinctions?

b) In my experience, the application developer is held responsible for the application's behavior in production. In the luckiest .01% of scenarios, there might be an infrastructure engineer with appropriate permissions and free time trolling the Slack support channel at the moment you report the issue. Otherwise 99.99% of the time infrastructure will not acknowledge of investigate anything complicated or subtle with just one service owner complaining. The infrastructure group, organizationally, is graded on shipping new platform features and on coarse KPIs for the performance of the platform as a whole; nobody is getting paid to investigate the weird bugs of some application team somewhere.

Re:How to properly manage SSH keys for server access by paranoidrobot on Saturday September 26, 2020 @10:34PM (#24603753)
> Isn't the whole idea of the word "DevOps" to eliminate such distinctions?

No, it doesn't eliminate such distinctions. My view of DevOps is more about ensuring that automation is used as much as possible to meet objectives.

It's definitely not about making everyone a homogeneous developer unit that can work on every problem.

People come in all shapes and sizes, some are more competent with certain things than others, others have a lot more experience with certain things. That's aside from the whole preference thing - not everyone wants to or has an interest in managing infrastructure.

Maybe when you have a handful of developers and a small set of infrastructure, that's fine - but at a certain point you start to require more and more specialised knowledge. Yes, even when you're all-in on Cloud and using all the SAAS/PAAS products out there.

>Otherwise 99.99% of the time infrastructure will not acknowledge of investigate anything complicated or subtle with just one service owner complaining.

Yeah, that's an organisational problem from the sound of it.

Re:How to properly manage SSH keys for server access by dijit on Sunday September 27, 2020 @03:09AM (#24604837)
Everyone having their own idea of what devops means is problematic.

I think it’s best to consider the original source which is this talk from Flickr: https://youtu.be/LdOe18KhtT4

("10+ Deploys Per Day: Dev and Ops Cooperation at Flickr").

Directly it talks about joining developers and operations into the same team- later Patrick Debois would refer to this as DevOps and a year later the first DevOps days in Ghent was organised (also by Debois).

Re:How to properly manage SSH keys for server access by dasil003 on Sunday September 27, 2020 @11:35AM (#24607411)
Thanks for reminding me that someone else remembers this. It seems like it took no more than 5-6 years for everyone to simply adopt the term as a replacement for sysadmin with no change in operational practices. Coincident with that it seems most infra engineers started calling themselves SREs to distance themselves from the diluted concept.
Re:How to properly manage SSH keys for server access by peterwwillis on Sunday September 27, 2020 @08:15AM (#24606068)
Yep. It's more of a concept of cooperation than anything else. Which, since it's not a concrete thing, makes it harder for people to understand. But then there's specific practices that arose out of trying to drive best practices in Ops at the same time (like IaC, II, CattleVsPets, automation, etc) so now DevOps "means" a jumble of slightly related things.

We really need some new terminology.

Re:How to properly manage SSH keys for server access by mongol on Sunday September 27, 2020 @08:36AM (#24606184)
Is that the original devops talk, which is like the origin if the devops "movement"? Very cool, did not know it had such a clear origin.
Re:How to properly manage SSH keys for server access by thayne on Sunday September 27, 2020 @01:17PM (#24608222)
At my company, a subset of developers have ssh access, if other developers need something that requires ssh access they work with someone who has it. But unless you are a very early startup, I don't see why every developer would need ssh access.
Re:How to properly manage SSH keys for server access by Aeolun on Saturday September 26, 2020 @09:42PM (#24603535)
Yeah, ever since devops became a thing they’ve placed themselves in this position where they’re somehow better than the application developers, even though until a few years ago those same developers were doing the exact same things.

I swear, sysadmins were annoying as an application developer, but devops is something else.

People with one year of actual work experience get hired as devops, and have all the privileges I would need to fix their mistakes, but I can’t, because I’m an ‘application developer’. So instead you end up teaching them how to do their job.

I’m not salty at all.

Re:How to properly manage SSH keys for server access by emptysongglass on Sunday September 27, 2020 @02:24AM (#24604632)
DevOps is a set of practices not a role. I do Ops, practicing DevOps, and I serve my programmers. My job is to ensure they stay happy. If they're not happy about something in the production pipeline that's on me. I work hard to make sure that I'm their Jesus Christ for all things infrastructure.

If your programmers aren't delighted with you, I'd say you the Ops person is not practicing DevOps or you have a buy-in problem to DevOps practices at an organization level.

Re:How to properly manage SSH keys for server access by monkey34 on Sunday September 27, 2020 @08:04AM (#24605999)
I love this take.

My previous role had my title as "DevOps Engineer" but it always rubbed me the wrong way. I was just an Operations Engineer with a focus on making my developers' jobs easier, in any way I could. Having that as my North Star kept me honest about the work I was doing versus considering the role more like Operations Engineer v2.0.

In the Silicon Valley, at least, DevOps seemed to be (seems to be?) sort of in vogue; I think it's important to keep its core qualities of bridging Development and Operations in mind as opposed to just shifting an existing position's title in an attempt to attract talent.

Re:How to properly manage SSH keys for server access by peterwwillis on Sunday September 27, 2020 @08:24AM (#24606111)
Preach!!

And this should extend throughout the organization. If Architecture or Security or any other group is making your life miserable, they too should be DevOps'ing, working closely with you, caring about your frustrations that only they can fix. Sadly there are still so many silos left to break up.

Re:How to properly manage SSH keys for server access by ralmeida on Monday September 28, 2020 @09:10AM (#24616241)
Agree, a job title of “DevOps Engineer” is an organizational smell for me.

Most people with such a title are actually something like “Automation Engineers”, “Infrastructure Engineers”, “Operations Engineers”, “Site Reliability Engineers”, etc, that are involved in a DevOps “process”, “initiative”, “culture”, etc.

Re:How to properly manage SSH keys for server access by xref on Saturday September 26, 2020 @10:36PM (#24603763)
Ah the classic ivory tower argument where some “other class” of engineers are universally inept, but not “my class!”

You can write the same screed full of generalizations from the perspective of any job title: a devops person would lament the fresh-out-of-bootcamp “application developers” who have no idea how systems work together so write SQL queries that retrieve a million rows, one at a time. “Works on my local!”

Re:How to properly manage SSH keys for server access by hinkley on Sunday September 27, 2020 @12:33AM (#24604246)
Pretty sure GP was bristling at the reverse happening. We must keep the developers from screwing up the important computers.

Saying the emperor has no clothes is not white tower thinking,

Re:How to properly manage SSH keys for server access by Aeolun on Sunday September 27, 2020 @06:08AM (#24605544)
I completely agree. Access to those things should be given to those qualified to work with them, not based on an arbitrary role designation.
Re:How to properly manage SSH keys for server access by laumars on Sunday September 27, 2020 @06:24AM (#24605617)
I’m sorry you’ve had some bad experiences but not everyone is like that.

However it’s also misguided to assume that specialities don’t exist. You can have infrastructure guys, developers, security folk; and there will be overlap between each role but it’s impossible to be the master of each trade.

I agree that arrogance is an unpleasant trait but arrogance can take many forms, rudeness to colleagues, or over assuming ones own technical capabilities in adjacent fields.

Re:How to properly manage SSH keys for server access by Mandatum on Sunday September 27, 2020 @05:55AM (#24605501)
I've yet to find many organisations that split those responsibilities up enough. This might work for 1% of orgs, wait no - 1% of tech orgs, but everyone else needs something better.
Re:How to properly manage SSH keys for server access by hnlmorg on Sunday September 27, 2020 @07:54AM (#24605952)
I can't vouch for your experience but as a sysadmin myself I've found 100% of the companies I've worked for has had dedicated sysadmins ;)

I'm being a little flippant here though, I am aware that developers are often asked to wear the sysadmin hat too.

Re:How to properly manage SSH keys for server access by rhizome on Monday September 28, 2020 @07:28PM (#24622389)
Here's a funny thing: as of two days after this post was created, pairing hasn't been mentioned once in the entire thread. If this thread is any indication, maybe it's developers who have an incomplete understanding of DevOps.
Re:How to properly manage SSH keys for server access by paranoidrobot on Saturday September 26, 2020 @07:20PM (#24602916)
That should be the exception, rather than the rule.
Re:How to properly manage SSH keys for server access by anamexis on Saturday September 26, 2020 @08:12PM (#24603180)
And it is deeply frustrating when you run up against one of these exceptions and need to wade through some bureaucracy before you can investigate further.
Re:How to properly manage SSH keys for server access by paranoidrobot on Saturday September 26, 2020 @11:05PM (#24603900)
It would seem to me that this is the perfect time to pull in someone with more production experience. Perhaps they can use the existing tools to pull logs, or analyse it in some way. Maybe they've seen it before and already know the fix.

Giving everyone production SSH experience is, in my experience, a way to run into all sorts of weirdness, not to mention endless frustration.

In a modern automated infrastructure, that box is likely a container running on a virtual machine that's ephemeral and can (and probably will) go away at any moment based on any number reasons - maybe CD kicked off a new deployment, or maybe the load changed and the instance was selected for scale-down, or maybe our spot bid for that AZ isn't sufficient for keeping the instance around, maybe you being SSHed in and poking around impacted the health-check, and so it's being killed for not performing right.

Theres many other problems, too - lots of applications are built in some way that there's simply no other way than secrets (passwords, api tokens, keys) to reach other systems, particularly third party systems. So production boxes have production secrets, which you probably don't want to share with everyone.

Giving everyone SSH access so they can, in theory, take nginx/kernel dumps as needed tends to imply giving superuser rights, which means they can do whatever they like.

So, yes, pull in someone else - find some way to try and reproduce the problem NOT on production, if that fails, perhaps there's a way to grab enough detail or pull additional logs or network captures to identify the issue. If that fails, well okay, lets SSH in - but we need to coordinate that to ensure that instance does't go away, and doesn't impact production while you do it.

Re:How to properly manage SSH keys for server access by gabereiser on Saturday September 26, 2020 @09:19PM (#24603455)
the point people are trying to make is that if you are at the scale where a kernel bug or an nginx bug is borking your app, it's not the developers job to go poking around the system for a fix. It's the devops/infra people's job. In my world, if you want to investigate an nginx bug... "docker run -it nginx:latest /bin/bash" and go for it... find the issue, reproduce it, then fix it in the pipeline and deploy again. You didn't touch production at all. If your debugging relies on being ON PRODUCTION, you don't suffer from the scale you need to be on there in the first place.
Re:How to properly manage SSH keys for server access by jclulow on Saturday September 26, 2020 @10:12PM (#24603657)
Not all bugs are sufficiently cheaply reproducible outside the environment in which they are observed. It seems silly to tie your hands behind your back when you could just inspect what the computer is doing and then fix it.
Re:How to properly manage SSH keys for server access by shawnz on Saturday September 26, 2020 @10:32PM (#24603745)
Why can't your developers be "devops people"?
Re:How to properly manage SSH keys for server access by TuringNYC on Sunday September 27, 2020 @05:09AM (#24605279)
I think developers can be devops also - but they are different skills you need to learn and keep up. Someone good at, say, nodejs or python data science may not be the best at CUDA build compilation on CentOS. And being good at both makes you less good at each unless you're working 18hrs a day to keep up with everything.

There is also the case of ratios. An organization probably needs more developers in specific areas than DevOps, so with dedicated DevOps you could concentrate similar work from across several teams to a dedicated DevOps team that knows that work very well.

Re:How to properly manage SSH keys for server access by paranoidrobot on Saturday September 26, 2020 @10:46PM (#24603812)
I've already written a response to this elsewhere in the thread, but developers are not all equal.

You can't hire twenty developers that all have the same skill/inclinations, the same interests, the same experience.

That's not to say that a DevOps Engineer is some super 10x rockstar developer - no, they're going to have the same variations on skill, interests, experience, etc.

It depends on your environment, but there's so much different tech once you count the entire stack, that I don't think it's reasonable to expect any one person to be an expert on all of it, or even a lot of it.

Re:How to properly manage SSH keys for server access by shawnz on Saturday September 26, 2020 @10:56PM (#24603861)
Sure, but "not all developers can be devops engineers" doesn't necessarily imply "none of your developers should have server access".
Re:How to properly manage SSH keys for server access by paranoidrobot on Saturday September 26, 2020 @11:16PM (#24603941)
Lets go back to the original core assertion for the thread -

> > Every developer needs access to some servers for example to check the application logs.

> I fundamentally disagree with this.

So,

Developers shouldn't be reaching for SSH access to check logs.

If you're encountering problems that you can't diagnose through the existing logs, then you should probably be involving at least one other person - someone who has that production experience, who might have some additional knowledge about the problem.

If, and only if you've exhausted other avenues - then reach out for SSH access. But it should be a last resort, not the first resort. Plus, anyone SSHing into production boxes should really be very familiar with how production is configured. You can do more harm than good by poking around on a production box being completely unaware that you're causing alarms and outages elsewhere because you taking a memory dump of nginx caused in-flight requests to get timeouts and so-forth. The people with that experience are generally the DevOps/Infrastructrue folks since they're the ones who deal with production all day, and are going to get the pages if something goes wrong with that.

Re:How to properly manage SSH keys for server access by shawnz on Saturday September 26, 2020 @11:29PM (#24604009)
Some of your developers might have that experience even if they were not hired as devops engineers, or they might be able to consult with their colleagues who are developers who have that experience but aren't devops engineers. I think it is usually better to let people work in the way that is most efficient for them. Also, this doesn't necessarily have to apply to production systems.
Re:How to properly manage SSH keys for server access by paranoidrobot on Sunday September 27, 2020 @12:05AM (#24604151)
> Some of your developers might have that experience even if they were not hired as devops engineers, or they might be able to consult with their colleagues who are developers who have that experience but aren't devops engineers. I think it is usually better to let people work in the way that is most efficient for them.

Yeah, perhaps. It'll depend on the circumstances, right.

I've got a reasonable amount of GSuite and Exchange experience, and same for Active Directory. I'm reasonably confident that I can work my way around those and do most of what I need to do without breaking it.

I needed some GSuite groups set up, some folks added to them, and a GSuite OAuth application set up and some values passed back and forth to do some integration. The only way to do all of that is with full GSuite Administrator rights.

Now, I could ask why they don't just give all Devops folks GSuite admin rights, it'd be much easier (for me) and I could do my job more efficiently.

The response is going to be something along the lines of:

> You don't need that access most of the time. > The times you do need that access it's often for a limited time or scope, and to resolve a specific problem. > For now, It's better that you work with someone who is responsible for that stuff on a day to day basis to do those things.

This is, in my opinion, pretty reasonable. Sure, it meant more delay until someone was available to do the GSuite configuration, and we needed to jump on a call to pass IDs back and forth and test it out. But it got done, and it wasn't overly burdonsome.

They didn't hire me as a GSuite, Exchange or AD Admin - they already have folks to handle that. That I have that knowledge and experience is still useful for the company - I know exactly what to request is done, and we can talk on the same level about it. Heck, if it turns out that I need this every day and I'm constantly going back and forth with them on setting things up - then I might get that access, but it'll probably come with an explicit requirement that I use it in specific ways, that I follow their processes/procedures, and keep them informed on when I'm using it and why

Re:How to properly manage SSH keys for server access by athms on Saturday September 26, 2020 @08:34PM (#24603277)
>What if you encounter an nginx bug, or a kernel bug?

That is the responsibility of system administrators. Application developers have no business on a production machine. If your sysadmins don't have the technical skills to diagnose these problems, they are incompetent and must be replaced.

Re:How to properly manage SSH keys for server access by Aeolun on Saturday September 26, 2020 @09:45PM (#24603546)
> If your sysadmins don't have the technical skills to diagnose these problems, they are incompetent and must be replaced.

The actual result of this is that the sysadmins are not replaced, and the application developers end up in an emergency conference call at 3am to tell the sysadmins which buttons to click on the production environment, since they’re not allowed access themselves.

Re:How to properly manage SSH keys for server access by athms on Tuesday October 06, 2020 @08:26AM (#24696966)
I spent several years at a large multinational cloud provider that gave developers and QA access to production systems and customer PII. That all changed after the company was bought by SAP and operations were integrated. I am amazed that engineers think this is acceptable. It is bad business practice, compromises security, and illegal in some jurisdictions.
Re:How to properly manage SSH keys for server access by toomuchtodo on Saturday September 26, 2020 @11:19PM (#24603957)
If developers aren’t exposed to the deficiencies in their systems, they have no incentive to reduce SRE pages and triage. Build resilient code with quality documentation and you don’t have to attend a 3am conf call.

DevOps is not a role or role segregation, it’s about aligning incentives and outcomes across functions in an org (hopefully through collaboration, tooling, and knowledge transfer).

The caveat is that if your org is fundamentally broken, none of the above applies or works and it’s all lipstick on a pig.

Re:How to properly manage SSH keys for server access by jeffbee on Saturday September 26, 2020 @06:38PM (#24602726)
I fundamentally agree with your fundamental disagreement with the article, but then I also fundamentally disagree with:

> ship log events out of the box and into something searchable, indexable, and can derive metrics

That's just a way to spend a ton of money. There's really not a reason to ship or index logs. Just leave them where they are produced and instead of shipping them to a central thing that inevitably becomes an expensive bottleneck, instead develop ways to access them in place (other than SSH) and frameworks for large-scale distributed searching where you push the predicate out to the machines where the logs exist.

Re:How to properly manage SSH keys for server access by hnlmorg on Saturday September 26, 2020 @07:27PM (#24602952)
That's fine if you don't have many servers and treat them as pets[1] but once you start scaling sideways, auto-scaling, using docker / Kubernetes or any of the other tooling around build pipelines or clustering and you quickly run into issues if those logs aren't streamed to a central repository.

This is the age old problem of simple problems being harder to solve at scale. Running a blog on Digital Ocean is very different to running a million dollar application on AWS.

[1] https://medium.com/@Joachim8675309/devops-concepts-pets-vs-c...

Re:How to properly manage SSH keys for server access by jeffbee on Saturday September 26, 2020 @07:35PM (#24602999)
People always -- always -- pull cattle-vs-pets on me after I advocate for this position, but I've slaughtered more machines than any of you. The problem is that you are treating your logs as pets when the truth is the logs are also cattle. Virtually all debug logs will pass through their life cycle without being read, so indexing them is just a flagrant waste of energy.
Re:How to properly manage SSH keys for server access by hnlmorg on Saturday September 26, 2020 @07:53PM (#24603092)
> I've slaughtered more machines than any of you.

I'd rather not engage in pointless unprovable arguments, if you don't mind.

> The problem is that you are treating your logs as pets when the truth is the logs are also cattle. Virtually all debug logs will pass through their life cycle without being read, so indexing them is just a flagrant waste of energy.

You shouldn't have debugging enabled on production systems unless you have an interim process that filters out debug messages before they get indexed (and thus you can toggle which logs get indexed there rather than reconfiguring / redeploying all of your application nodes).

Also nobody is suggesting logs should be treated as "pets". You still want to purge out older logs however the problem is you cannot always replicate reported errors so if you don't have those log messages captured then you're sod out of luck.

Don't get me wrong, there is a certain allure to the traditional method of systems administration - I've been on both sides of the fence - but central logging services have so many other benefits such as security (tamper proof logs, users don't require SSH), ease of use, persistent logging, etc. The only real downside is cost but that quickly becomes absorbed in your pricing plan when customers start asking for SLAs.

Re:How to properly manage SSH keys for server access by R0b0t1 on Saturday September 26, 2020 @08:35PM (#24603282)
I have to agree with the other guy. Going too far into "Don't touch the machine" leads you to ridiculous places. Designing your system to be instrumented is invaluable, and sometimes that means logging on to a machine. Should you minimize this? Yes, but not to the point you invest tens of thousands or more into a way to not use SSH.
Re:How to properly manage SSH keys for server access by Aeolun on Saturday September 26, 2020 @09:33PM (#24603500)
Since we already know you can put a more or less adequate elasticsearch cluster on DO for $60 per month, I don’t think that argument holds a lot of water.

By the time you want centralized logs, you are probably already spending much more than the logging will cost on infrastructure.

Re:How to properly manage SSH keys for server access by majkinetor on Sunday September 27, 2020 @03:11AM (#24604849)
ES cluster might be easy to install but doing all other chores with your log, along with learning ES search language and quirks is far from trivial. I personally spent months making viable solution on premise and its not something I want to do again. Way less hassle to access server directly for daily logs and just move them during the night on some archival storage.
Re:How to properly manage SSH keys for server access by hnlmorg on Sunday September 27, 2020 @07:48AM (#24605931)
Nobody said "you should never log into the machine!" We just said reading log files shouldn't require SSH access.

What you're doing here is constructing a straw man argument while agreeing with the same point I was making.

Re:How to properly manage SSH keys for server access by R0b0t1 on Sunday September 27, 2020 @11:21AM (#24607301)
Hold up, never log into the machine is exactly what the discussion is about, not logging into machines for log access being one aspect of it.
Re:How to properly manage SSH keys for server access by hnlmorg on Sunday September 27, 2020 @05:05PM (#24610122)
I'm guessing you skim read most of the replies after the OP? The OP did touch upon it when describing their own architecture (albeit he wasn't actually suggesting that should be how everyone operates) but everything after that has been more narrowly focused. This particular branch of the discussion was specifically discussing log access:

> > ship log events out of the box and into something searchable, indexable, and can derive metrics

> That's just a way to spend a ton of money. There's really not a reason to ship or index logs...

Re:How to properly manage SSH keys for server access by R0b0t1 on Monday September 28, 2020 @10:57AM (#24617309)
They're explicitly talking about not logging into machines for log access. One of the ways to make it seem a reasonable suggestion is the broader topic of not logging into machines at all, ever, and why that may be a good thing.
Re:How to properly manage SSH keys for server access by hnlmorg on Monday September 28, 2020 @04:33PM (#24620942)
> They're explicitly talking about not logging into machines for log access.

That's what I said. ;)

> One of the ways to make it seem a reasonable suggestion is the broader topic of not logging into machines at all, ever, and why that may be a good thing.

Except none of that was being discussed. Only log access.

Re:How to properly manage SSH keys for server access by R0b0t1 on Tuesday September 29, 2020 @10:18AM (#24628106)
The conversation involves both.
Re:How to properly manage SSH keys for server access by hnlmorg on Tuesday September 29, 2020 @06:12PM (#24633634)
No it doesn't. By your own admission:

> They're explicitly talking about not logging into machines for log access.

Why can't you just admit that you didn't read the thread properly rather than insulting all of our intelligence with these piss poor mental gymnastics where you redefine the context of what people had very clearly written.

Re:How to properly manage SSH keys for server access by R0b0t1 on Wednesday September 30, 2020 @12:07PM (#24640251)
Because I read the thread? How many times do you want me to repeat myself? They're talking about the specific case of not logging in for log access, but that is partially justified by the wider desire to never have people log in at all. You can separate them but the original conversation didn't.
Re:How to properly manage SSH keys for server access by hnlmorg on Sunday October 04, 2020 @06:31PM (#24682776)
> You can separate them but the original conversation didn't.

The conversation you're replying to, however, did. I know this for a fact because I was involved in that conversation and I made that distinction myself ;)

Re:How to properly manage SSH keys for server access by tristor on Sunday September 27, 2020 @12:30AM (#24604235)
> I've slaughtered more machines than any of you.

I guarantee that you haven't, as the number of people that can make that claim in relation to my background is vanishingly small and I know almost all of them by name.

I centralize logs. Not only does it make more sense for administration at scale, it's invaluable for security reasons and assists in compliance by providing a controllable guaranteed audit trail.

You may have a valid argument about cost here for some applications, but it's unwise to make arrogant claims you cannot back up.

Re:How to properly manage SSH keys for server access by jdxcode on Saturday September 26, 2020 @09:05PM (#24603393)
> I've slaughtered more machines than any of you.

Not only is that vanishingly unlikely to be true with this crowd it’s also not at all the kind of rhetoric that they’ll listen to either.

Re:How to properly manage SSH keys for server access by markbnj on Sunday September 27, 2020 @01:10AM (#24604371)
When I read that comment I was thinking about our auto-scaling nodepools on GKE that have been running for a couple of years and scale up/down every business day by 20-40 nodes or so depending on load... but I am not sure I get to take credit for slaughtering them.
Re:How to properly manage SSH keys for server access by seized on Sunday September 27, 2020 @11:56AM (#24607585)
So that's the new replacement for pointless uptime boasting.... Except even less provable.
Re:How to properly manage SSH keys for server access by gabereiser on Saturday September 26, 2020 @09:15PM (#24603441)
the logs in my case are audit trails required for compliance and for investigation by 3rd parties.
Re:How to properly manage SSH keys for server access by viraptor on Saturday September 26, 2020 @07:24PM (#24602934)
This way you lose them every time when something goes wrong with the infra, or when your fleet autoscales. Or if you do blue-green deployment with infra, then on every deployment.

Your storage/indexing money spend scales with your company. If you have < 10 hosts you can probably handle logs with a cost that's a rounding error with something like loki+grafana.

If you have a bigger environment and more people, the cost will be more significant, but you'll also likely have more revenue to justify it.

Re:How to properly manage SSH keys for server access by Narkov on Saturday September 26, 2020 @08:30PM (#24603264)
> There's really not a reason to ship or index logs.

Proper Information Security policy is one very good reason. If a box is compromised, you don't want the logs being tampered with.

You ship the logs to a central, dedicated server so that a clear audit trail can be established.

Re:How to properly manage SSH keys for server access by nurettin on Sunday September 27, 2020 @01:36AM (#24604454)
Shipping software logs is just useless bureaucracy. Don't confuse it with shipping firewall/ssh/rdp logs which is an absolute must for telling how/when you were pwned. Hacker will just disable app/db logs, update their user as admin, dump the db and proceed with the cryptofuckery.
Re:How to properly manage SSH keys for server access by throwawayinfo on Sunday September 27, 2020 @11:03AM (#24607137)
Eh? In my experience logs are some of the most valuable data produced by software. Debugging, experiments, software quality, auth trails, analytics, customer support, privacy, security, audit/compliance and abuse are all seriously useful applications for logs. Throwing them away is like dumping gold.
Re:How to properly manage SSH keys for server access by nurettin on Friday October 02, 2020 @03:18PM (#24666075)
Yes, nobody said throw away application logs. That's dumb.
Re:How to properly manage SSH keys for server access by jdxcode on Saturday September 26, 2020 @09:03PM (#24603383)
I imagine basically any form of compliance would require centralizing logs in some form
Re:How to properly manage SSH keys for server access by f0rfun on Saturday September 26, 2020 @11:12PM (#24603925)
and for audit. Audit/Compliance is one of the worst yet valid reasons to introduce complexity, redundancy and all sorts of costs into projects. It's also why some people earn a living out of it purely.
Re:How to properly manage SSH keys for server access by tyldum on Sunday September 27, 2020 @01:18AM (#24604400)
Authentication, authorization and access logs typically. Generic application logs can often be treated differently.
Re:How to properly manage SSH keys for server access by jakupovic on Saturday September 26, 2020 @07:10PM (#24602870)
Inception of fundamental disagreements ...

On the point, what do you do if the machine is not there anymore? Your model fails immediately. Also, some processes operate on an assumption that the "machine" will stand-up -> do-something()- > die(), which your model also doesn't support. Not to be messing with you, but I don't think there is the "right" model, but whatever works for us. I do like your model for immediate accessibility of the logs.

Re:How to properly manage SSH keys for server access by spicyramen on Saturday September 26, 2020 @10:29PM (#24603733)
In production systems when something goes wrong is very common to ask customers/support team for logs. In most cases customer need SSh access or some role to collect this info. By the time they get to those, they are gone. In my experience to really scale a service you need OOB logging tools and automation to perform actions around errors in logs
Re:How to properly manage SSH keys for server access by gumby on Sunday September 27, 2020 @12:52AM (#24604310)
You could just have an sshable account without shell privileges, only able to run grep or some small set of controlled utilities and with filesystem access restricted to read only access to the log sirs.

Anyone who needs access could remotely run a command that would return the results of whatever permitted query they submitted.

Re:How to properly manage SSH keys for server access by throwawayinfo on Saturday September 26, 2020 @09:59PM (#24603610)
I've seen centralised logging scale to FANG level, so I really wouldn't worry about bottlenecking.
Re:How to properly manage SSH keys for server access by mpaepper on Saturday September 26, 2020 @05:45PM (#24602416)
Thank you, I agree that this should be avoided as much as possible in general.

Actually, in my company, we are pushing the logs to an external service, so I guess that line I wrote there was not totally thought out. ;)

However, it still might be useful for certain people to check servers for health or other metrics and you might not always have everything as perfect as you wish. I guess you already stated that yourself.

So in general I'd agree. Good comment!

Re:How to properly manage SSH keys for server access by gabereiser on Saturday September 26, 2020 @05:54PM (#24602474)
Health is a function of the application, not it’s host. A health check endpoint is paramount to ensuring the app is healthy. I still disagree with having _any_ access to a “box”. Local dev, console log, deployed debug? Better make sure you are logging events and not non-sense. Actionable events with request tracing (preferably). But yeah, it was a good article. Bitwarden is something I’ve used to share privileged keys before but the whole signing stuff was the right way to go.

Also, if you aren’t on “cloud”, odds are you are still using something like Kubernetes or DC/OS or Swarm or the like. If you aren’t then well, wordpress sites aren’t really in the same ballpark technically. (Joke, Wordpress sites get traffic, some lots of traffic, I don’t discriminate against the PHP tribe).

Re:How to properly manage SSH keys for server access by holoduke on Saturday September 26, 2020 @06:30PM (#24602689)
I see your point. But you are incorrect and too much reasoning probably from your current position. In many new companies practicality is very important. There are maybe no resources to setup a giant set of utilities which replaces info you would normally get by SSH to a server. In a new company you wanna make this a graduate process. The security aspect is always important. But it's a balance. You cannot over engineer.
Re:How to properly manage SSH keys for server access by all_usernames on Saturday September 26, 2020 @05:45PM (#24602420)
Agreed, and what you're saying is really the proper way do things in a cloud-native environment where all hosts are ephemeral, containerized apps are idempotent, and especially a serverless environment where no one has access to the invisible host.

However, for anything shy of full serverless, just s/developer/ops and you still have to solve for the same problem. At the end of the day you're always going to want someone to be able to get a shell on the box for troubleshooting some critical issue. If there is a box.

Re:How to properly manage SSH keys for server access by secondcoming on Sunday September 27, 2020 @06:31AM (#24605643)
> Backend developers should make a conscious decision on how to ship log events out of the box

Great! hand waving. What are you going to do is this log streaming process stops working, and cannot restart? Kill the machine and lose the logs? That might be ok for your webapp, it could be trouble for more serious applications.

> You’d be surprised at how much less stress there is when you can have alerts on log events from your application when things break instead of a support call or a support ticket.

Giving SSH access doesn't mean you don't have event logs.

> stopped teaching people to treat their app and server as a second home, as a pet, that must be nurtured

In our case, nobody is treating anything as a pet. Our servers are mostly spot/preemptibles, but we still have SSH access. Because it makes it really easy to debug if things do go badly wrong. From being able to see htop output, to being able to upload custom binaries to investigate an issue, or to smoke test a code change... it's a huge time saver.

Give me SSH or give me death.

Re:How to properly manage SSH keys for server access by ThePhysicist on Saturday September 26, 2020 @05:52PM (#24602463)
We also manage our whole infrastructure automatically via Ansible, but if there's a problem that goes beyond an error in the deployed code it's still necessary to access a machine via SSH in order to debug it. Logs are arguably something that can be easily centralized as most application support logging via syslog and there are a lot of great tools available for it like greylog.
Re:How to properly manage SSH keys for server access by gabereiser on Saturday September 26, 2020 @05:57PM (#24602491)
Sure, having a privileged key you use with ansible to actually do the thing... but we’re talking about giving the shop access to the box. Not your team of highly trained infrastructure engineers (or bob, who has all his playbooks on a thumb drive for his office). If ansible and non-cloud is your deal, an ssh key (or two: deployments) is fine. I’m just against giving others access to things they could break or worse, leave the door open...
Re:How to properly manage SSH keys for server access by pnutjam on Saturday September 26, 2020 @10:21PM (#24603698)
IMHO, using ansible to manage keys is a way simpler process. You won't miss things because your inventory file has everything.
Re:How to properly manage SSH keys for server access by kevindong on Saturday September 26, 2020 @10:49PM (#24603824)
The main counterpoint is what do you do when the logging system goes down at the same time there's an incident? Do you then just rely purely on metrics/customer reports to try to debug?
Re:How to properly manage SSH keys for server access by zachrose on Saturday September 26, 2020 @10:56PM (#24603862)
When you’re tailing logs on a server there’s still a “logging system“ (your ssh connection, tail -f, a disk with finite space) that can still “fail”. Probably in either case you’d work to fix logging and you’d hope that the system is simple enough to fix.
Re:How to properly manage SSH keys for server access by Spivak on Saturday September 26, 2020 @11:10PM (#24603919)
Logging systems are annoyingly complicated and there are a lot of moving pieces that can fail. Way more than reading a file over SSH.

This kind of access shouldn’t be your go-to but it’s important to have a battleshort.

Re:How to properly manage SSH keys for server access by chousuke on Sunday September 27, 2020 @05:36AM (#24605411)
What's complicated about a syslog server? I suppose some applications like to spew out multiline logs (which are something you just can't process outside the source while maintaining sanity) but seriously, when you actually consider these things while writing the application, you don't need all that much to have something workable.
Re:How to properly manage SSH keys for server access by Spivak on Sunday September 27, 2020 @08:28PM (#24611546)
I was going to make a note that an rsyslog collector would be my only exception to this because of how simple it is but you still have to be careful because by default rsyslog is okay with losing logs in-flight.

But I would be lying if the typical logging setup was this simple. It’s basically all remixes of ELK and while they’re fantastic when they work there are a lot many moving parts that can individually fail.

Re:How to properly manage SSH keys for server access by stjohnswarts on Sunday September 27, 2020 @12:38AM (#24604260)
I think the point is that there's often a lot more to server access than just looking at logs. The article offers a solution to that.
Re:How to properly manage SSH keys for server access by recursive on Saturday September 26, 2020 @09:37PM (#24603513)
My application runs on my customers' server(s). I don't generally have any access to anything.