Live data from Hacker News

Linux boxes via SSH: suspended when disconected

shellbox.dev

121–130 of 163 posts

Re: Linux boxes via SSH: suspended when disconected

#121

Unrelated in many ways, but I have the reverse problem: When I suspend my Linux machine, my ssh connections are lost. Anyone know of a good solution for this? PS: Yes, I know about tmux/screen but I'd like a solution that keeps the connection, because I often forget to start a screen session. Also, I'd like my X11 applications to keep working.

Use tmux. Ssh in and start a tmux session. If the connection breaks you can ssh back in and reconnect to the tmux session later.

GNU Screen is another alternative

Re: Linux boxes via SSH: suspended when disconected

#122
post #114
post #8

Earlier quoted context omitted.

Interesting to compare with Fly's sprites: https://sprites.dev/#billing

Maybe I'm being dense, but could someone kindly explain to me the "Web App" example on that Sprites page? " 30 hours of wake time per month (~5 concurrent users avg), averaging 10% of 2 CPUs and 1 GB RAM " Does that mean it would sit available but using 0% when there's nobody on the site, and just bill for usage when web traffic is causing the server to do work? So if the web app went a month with no visitors it woul…

> So if the web app went a month with no visitors it would cost nothing (except for the file storage fees)?

Yes that's the idea. The public URL for a sprite is served by a (free) load balancer. The sprite is normally suspended, gets resumed when a request comes in, then suspended again. Not sure on the exact timeouts, they probably don't suspend immediately after a response is sent.

Re: Linux boxes via SSH: suspended when disconected

#123

Unrelated in many ways, but I have the reverse problem: When I suspend my Linux machine, my ssh connections are lost. Anyone know of a good solution for this? PS: Yes, I know about tmux/screen but I'd like a solution that keeps the connection, because I often forget to start a screen session. Also, I'd like my X11 applications to keep working.

Mosh on server and client keeps the SSH connection going during suspension or network drops, etc.

https://github.com/mobile-shell/mosh

Re: Linux boxes via SSH: suspended when disconected

#124
post #122
post #114

Earlier quoted context omitted.

Maybe I'm being dense, but could someone kindly explain to me the "Web App" example on that Sprites page? " 30 hours of wake time per month (~5 concurrent users avg), averaging 10% of 2 CPUs and 1 GB RAM " Does that mean it would sit available but using 0% when there's nobody on the site, and just bill for usage when web traffic is causing the server to do work? So if the web app went a month with no visitors it woul…

> So if the web app went a month with no visitors it would cost nothing (except for the file storage fees)? Yes that's the idea. The public URL for a sprite is served by a (free) load balancer. The sprite is normally suspended, gets resumed when a request comes in, then suspended again. Not sure on the exact timeouts, they probably don't suspend immediately after a response is sent.

Alright, thanks!

Re: Linux boxes via SSH: suspended when disconected

#125

Unrelated in many ways, but I have the reverse problem: When I suspend my Linux machine, my ssh connections are lost. Anyone know of a good solution for this? PS: Yes, I know about tmux/screen but I'd like a solution that keeps the connection, because I often forget to start a screen session. Also, I'd like my X11 applications to keep working.

WDYM lost? do you roam? I used to have a job with simple OpenVPN to connect to the servers (via public IP, just routed through the VPN tunnel) and ssh connections stayed during my trip from office to home. Probably needs both sides not to be overly aggressive with keepalives and such. VPN just reconnected at home, but tun0 device and its local ip stayed the same, ssh connections also stayed.

If you do not roam other side may do TCP keepalives or even ssh protocol keepalives and close the connection for you. Unless you can tune that, not much to do.

Other solutions might be mosh (mobile shell; haven't tried) or just running screen or tmux on the other end and just resume where you left of after quick reconnect.

Re: Linux boxes via SSH: suspended when disconected

#126

Unrelated in many ways, but I have the reverse problem: When I suspend my Linux machine, my ssh connections are lost. Anyone know of a good solution for this? PS: Yes, I know about tmux/screen but I'd like a solution that keeps the connection, because I often forget to start a screen session. Also, I'd like my X11 applications to keep working.

Use tmux. Ssh in and start a tmux session. If the connection breaks you can ssh back in and reconnect to the tmux session later. GNU Screen is another alternative

Yes, thanks, but it does not work for me since X11 applications lose their connection too.

Re: Linux boxes via SSH: suspended when disconected

#127

Unrelated in many ways, but I have the reverse problem: When I suspend my Linux machine, my ssh connections are lost. Anyone know of a good solution for this? PS: Yes, I know about tmux/screen but I'd like a solution that keeps the connection, because I often forget to start a screen session. Also, I'd like my X11 applications to keep working.

Mosh on server and client keeps the SSH connection going during suspension or network drops, etc. https://github.com/mobile-shell/mosh

Nice! But not a solution since it does not support X11 forwarding.

Re: Linux boxes via SSH: suspended when disconected

#128
post #10
post #5

Earlier quoted context omitted.

Hi, That is a good point actually. The suspended price has to be significantly lower than the alternative. I'll revise it. Still, there is the advantage of simplicity not having to deal with the web console etc. Some people may enjoy this

The interesting part here is that the box is stateful, unlike a Lambda. You return literally to the point where you left off.

Lambdas can be stateful, for example Durable Functions on Azure,

https://learn.microsoft.com/en-us/azure/azure-functions/dura...

Re: Linux boxes via SSH: suspended when disconected

#129
post #4

$36/mo for 2/4/50 VPS without public IP... Ok, I get the idea that the service is for non-regular use, but I think even $0.005 per hour ($3.6/mo) of suspended state is too expensive. The same config in Hetzner is just $4.09/mo for 24/7 working VPS with public IPv4 address

I think this is mostly true functionally, but not experientially.

A VPS gives you persistent state, but it still assumes you’re willing to manage that state. The distinction here seems less about what’s possible and more about who carries the ongoing operational burden: the user or the service.

Re: Linux boxes via SSH: suspended when disconected

#130
post #58

Earlier quoted context omitted.

> which seems tough given how cheap a VPS already is. A suspended machine only costs its disk usage to the hoster. You can have 800 of them on a machine with 4TB SSD. You can't say the same for VPS at all.

If the pricing for a product like this reflected that, it would certainly be more appealing to me. $5 a month is already so low though that unless I got way better performance for the same price or paid like, $0.50 a month or less for the same performance, it just doesn't seem worth it to me.

Yeah, same. If you’re competing on price, you have to have a competitive price. Unless you can come up with some solid real-numbers benefit to the environment or some other really compelling marketing angle, nobody cares if it’s theoretically the lower-cost way of doing things if that doesn’t translate into either a lower bill, or more service for a comparable bill.

The service seems neat, but the pricing seems more to be a novelty than a real service. Maybe I’m missing something.

Post reply on HN