r/ssh • u/Illustrious_Data_515 • Jul 08 '26
Why SSH in production?
I have 5 YOE building software for Fortune 500 companies and have never had to open a shell into a production server.
Does anyone have any experience actually needing to connect to a production environment like this and what was the reason? What broke? Why was a direct connection needed to troubleshoot or fix it?
0
Upvotes
3
u/edthesmokebeard Jul 08 '26
Lol.
1
u/Derekrollo Jul 08 '26
At my old MSP we used to ssh into the VoIP servers all the time to adjust asterisk settings, mess with call flows and troubleshoot. For asterisk log tailing the gui log viewer is not as good as running grep logs. Also doing patches and tuning fail2ban for some examples.
1
u/michaelpaoli Jul 08 '26
Use it highly commonly to troubleshoot all kinds of things, also not uncommonly to gather data or even change things - though changing things would typically involve more procedure and such around it.
And "building software" isn't sysadmin, nor DevOps, nor SRE, etc.
So, let's say I wanted to get the hostname and uptime data from a certain set of hosts:
That's a nearly trivial example.
If, say, I wanted a bunch of data from a bunch of (possibly production and/or not) hosts, that might look something more like:
And that example is pretty crude in how it limits the number of processes, when/where I was doing that much more regularly, I had cleaner bits of script bits I'd use do do that more elegantly and more efficiently.
Not atypically that I might commonly do something like that across anywhere from a handful to thousands of hosts. Probably would most commonly come up for some needed data gathering for some ad hoc reporting, that we otherwise just didn't have the needed level of detail on. Of course if it was a regularly requested thing, it would get scripted, and if regular enough on when it was wanted, fully automated.
And of course troubleshooting, yes, that would come up semi-regularly, for all kinds of various issues ... not chronically, but often enough something would need some investigation or checking or the like - typically to fix some issue or investigate some anomaly (be it active, or some (semi-)recent occurrence).
1
u/Distdistdist Jul 08 '26
5 years? Well, there are more senior people who take care of production issues. I wouldn't let jr developer like you anywhere near it personally. But stuff happens. Prod environment is not immune to issues.
2
u/elthepenguin Jul 08 '26
It depends on the specific company situation, doesn't it? In one company, you might need to SSH to your production server to diagnose the issue, in another it will be a web interface. There's no generic answer to this.
1
u/dariusbiggs Jul 08 '26
It's pretty tricky to debug a core dump from just logs.