Skip to content

SSH to a single, always the same, console

Hi,

I have a minecraft server on some laptop in my server room that I can turn on when I SSH into it (port forwarded). If I break the SSH pipe, however, I do not have access to the server commands anymore. Is it possible to make it such that if I ssh into the computer (or maybe via a seperate port?) I am shown that specific console? So basically that the console I ssh into is shared and can be accessed by anyone who also has access to the SSH keys.

Any ideas? Thanks!

9 points10 comments
Open on Reddit
About this post
Posted
Archived
Score
9 · 92% up
Kind
Text
ID
lhmres

Author

9
posts
25
comments
0
media
View profile

10 comments

As everyone says, tmux. But specifically if you’re using the Java Minecraft server look over at the MC wiki because there are better options for managing it so it starts at boot as a daemon, but still be able to send commands. They’re a better long term solution.

10 points

Others have already provided suggestions for tmux/screen/etc but I'll throw my recommendation in for Byobu, my favorite terminal window manager.

3 points

You have a bunch of options that does what you want, with various pros and cons e.g. tmux, screen, abduco and dtach

2 points

I'm not 100% sure what your exact use case is, but you can also try mosh. It doesn't have as many features as tmux/screen, but also no setup necessary (other than installing it on server and client). Just use mosh server instead of ssh server. It will automatically reconnect when your network connection drops and comes back and you won't lose the session. It's made for using ssh connections in unstable networks, like over mobile data.

0 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.