r/HomeServer • u/woldenbubbish • Jul 10 '24
When you accidentally kill ssh while on vacation
16
u/UnethicalExperiments Jul 10 '24
I feel personally attacked as I look at one of my game hosts I locked myself out of. Turned on some firewall rules, realized ufw wasn't running so I turned it back on. Forgot to update the rules for ssh. Sure it's an arms reach away to rig up to a monitor - damn it Scott I'm a lazy bastard!
13
u/tomeoma Jul 10 '24
Configure fail2ban, logout, try to login inserting too many wrong passwords. Ask yourself why you can't login anymore π€π€π€
1
5
Jul 10 '24
Put together a server and with a lvl 4 maybe 5 skill in Linux out of 10....shit is hard to get up and running.
I went to Debian, nope, couldn't for the life of me get drive sharing to work with samba.
Got Ubunti server, did the same shit and Samba sharing works. Using cockpit, Plex, everything is juicy right? No!
I can't fucking RDP in. Like holy fuck, I spent all of yesterday trying to sort it out. On Debian, I was using xfce so RDP worked because of x.
On Ubuntu, I'm using wayland(you sexy mfer) the gnome rdp doesn't work. I turn it on, try from my windows pc, natta. Open ports in UFW, natta. I try a multitude of different options but they don't work or are for X. I got TeamViewer to work, but that is in and of itself another shit thing I need to resolve (it needs user confirmation to allow remote connecting).
5
Jul 10 '24
Do you hate VNC?
1
Jul 10 '24
No, I have a lot of experience with VNC but I can't get it to work. Everything I've read indicates that its not Wayland friendly and I couldn't get it up and running and when I did it would just disappear..
2
u/Dry-Classic1763 Jul 10 '24
You are looking for rustdesk my friend. You can even selfhost the gateway but if you stay local only you can simply enter the IP address of the rustdesk server into the id number field in rustdesk client. Not even a gateway (neither selfhosted nor the official one) is needed. Give it a try, maybe it suits your needs :)
3
u/FunkyFreshJayPi Jul 10 '24
You use Ubuntu server and then deliberately install a desktop environment?
6
Jul 10 '24
More I used a desktop environment and installed server components on it because you can. I am not a pro - this is for me to learn with and play with and use. So yes, I am using Desktop with server packages to do things.
Blasphemous, I know - but it's my box. RDP is still a problem.
1
2
Jul 10 '24
Allow SSH to your router, open IPMI when needed to unblock yourself, voila! Then close IPMI.
3
u/MooseBoys Jul 10 '24
Donβt open IPMI to the internet, even briefly. Just do ssh tunneling.
1
Jul 10 '24
I was saying IF you locked yourself out of your server, not in a normal case.
A better option is to use a commercial-grade router with a VPN, and VPN into your LAN.
3
u/MooseBoys Jul 10 '24
My point is you can use IPMI without opening the port publicly. Just add
localforward 623 dead-server:623to your ssh config and it will tunnel through the connection.Personally I prefer ssh tunneling to VPN for almost everything.
2
Jul 10 '24
One of my last trips made me destroy my network. I had some nicer WiFi 6 netgear stuff and it crashed while I was away; taking down the network and vpn, until I was home.
Iβll never use netgear again, went asus.
2
Jul 10 '24
My Jellyfin being broken while Iβm on vacation and I canβt fix it because the ssh process crashed π₯π₯
2
u/dtdowntime Jul 10 '24
literally happened to me 2 days ago, my raspberry pi hosting a vpn and some small game servers crashed and i cant remotely turn it on
2
u/zayatura Jul 10 '24
Locking myself out of my home sever while traveling is exactly the reason why I bought a PiKVM. It was expensive but worth it.
2
u/Candy_Badger Jul 10 '24
I don't need my servers, while I'm on vacation. I am trying to avoid using any PC during vacation.
1
1
1
u/TechieGranola Jul 10 '24
I built an unraid server so it can sit there and do the same thing my raspberry pi didβ¦
1
u/LED_donuts Jul 10 '24
Had a little scare on vacation when I VPN'd in to my router. I was trying to clone a VPN Server config to a new configuration to test something out, and I guess the UI freaked out and rebooted the router. Thankfully everything was OK, and I was back in 2 minutes later.
1
u/CodingSquirrel Jul 10 '24
Last time I went on vacation, server had been running flawlessly for a while. No real issues beyond occasionally needing to restart a docker container. I get to my destination and a couple hours later the server hard locks up. Can't access it through any means. I had to ask my FIL to come over and hit the restart button.
When I got back I setup a second wireguard instance on another device and wired up an ESP8266 that connects to my server's IO headers so I can remote restart even if it's locked up.
Of course it's been working flawlessly since, so I haven't had a chance to test it beyond some initial trials.
1
u/MooseBoys Jul 10 '24
(remoted in to bastion server) βUgh why is port tunneling to my Raspberry Pi not working. Maybe I have some background connection holding the portβ¦β
pkill -f ssh.*
(surprised pikachu face)
1
u/GUI-Discharge Jul 10 '24
You ever have a complete data loss? I feel like I mess something up catastrophic once a year and have to start over lol
1
u/sequesteredhoneyfall Jul 10 '24
This format makes no sense. How would having zero control over a situation give anyone feelings of power?
1
u/Pancake_Nom Jul 10 '24
Owning a server gives me more of a feeling of power bills than power itself.
1
u/Unknown_Terrestrial Jul 10 '24
I use a couple of different remote management tools. I highly recommend DWService since it is completely free and gives you many features that are pay walled on TeamViewer, shell access being one of them. The only con I have found is that there is no mobile app, but it would work great as a backup remote access method in your situation. I think you can even install a CLI only version of it for machines that donβt have a desktop environment installed on them. I am super OCD and canβt settle with just two connection methods so I also have local VNC access setup on all of my machines, so as long as one can be accessed, then I can login to it and access the other machines from it. I also use scripts and scheduled system tasks that will check for network connectivity and if the Remote Desktop services are running and restart the service(s) or reboot the machine if need be. I am no expert and honestly have just learned through trial and error along with help from community forums and ChatGPT.
1
u/Unknown_Terrestrial Jul 10 '24
As a side note - I have developed a disliking towards TeamViewer because if you are like me and run a crap ton of virtual machines to fiddle around with, TeamViewer likes to accuse you of using their service for commercial use and revoke your TeamViewer access. Every time this happens, you have to fill out a form stating which TeamViewer ID(s) have been affected and then provide a lengthy statement explaining you are only using the software for personal use in your homelab environment. They always restore access but itβs just a pain to deal with it every other month.
1
u/ItalyPaleAle Jul 10 '24
Hereβs my plan for recovering while Iβm out of the house:
My 2 servers are each connected to a (separate) Z-wave enabled plug that I can switch on/off remotely via Home Assistant.
Home Assistant runs on a RPi. The RPi is powered via PoE so I can force-reboot that using the UniFi control panel
I can access the UniFi control panel using a proxy from either server, so as long as one of the servers is reachable, I can reboot the RPi
The UniFi control panel runs on the Dream Machine, which itself is on a Z-wave controlled plug that I can power cycle remotely (via HA)
1
u/jglass1029 Jul 10 '24
Configure iptables whitelisting your work public IP address and deny access to 0.0.0.0. Wonder why you got disconnectedβ¦you mistyped your public IP address π
1
u/j-mar Jul 10 '24
Happened to me last weekend. You can only ssh from in-network, which isn't a problem thanks to VPN. But VPN didn't want to work ....
0
u/maxz-Reddit Futro S740 - J4105 Jul 10 '24
Being a Reddit Mod who abuses his powers to feel superior ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
48
u/Twodee80 Jul 10 '24
Owning server hardware and has no clue what to do with it (or asking people on Reddit)