I'm setting up a Minecraft server on my Raspberry Pi and need a way to manage admin console commands and check logs directly from the terminal. I heard that the virtual consoles like `/dev/tty1` and `/dev/tty2` might be persistent, which sounds good. But when I use SSH, it seems to create a new virtual console that gets deleted once I disconnect, which would mean losing any running processes. Is there any way to SSH into a persistent virtual console so I can use features like scrolling and copying from my Windows computer?
5 Answers
If you're looking for GUI-like features, you might want to check out `shpool` from GitHub. It provides shell pooling capabilities and might offer the user experience you're seeking. But be aware, Linux's console doesn't support graphical scroll bars in the way a graphical terminal emulator does, so you might still have to rely on some keyboard shortcuts for that functionality.
Actually, you don't SSH into a persistent virtual console; that's not how it works. When you connect via SSH, you're given a new tty for that session. If you're looking for persistent sessions, tmux or screen are your go-to options. Both allow you to detach and reattach to sessions, and you can scroll back in history too. If you're looking for alternatives, you could check out conspy or some other tools, but I'd recommend sticking with tmux or screen because they do the job well!
GNU Screen is a great option as well. It lets you create a virtual console that you can detach from with CTRL+A followed by CTRL+D, then you reattach using `screen -r`. And don’t forget about scrolling: CTRL+A followed by `[` will let you scroll back. It’s all about getting comfortable with the commands, but it's super effective!
If you really want to access persistent virtual consoles directly, a tool like `conspy` can help you connect through SSH. Just remember that when it comes to scroll features, Linux's classic console is different from what you're used to with graphical terminals, so there will be a learning curve!
It sounds like you're dealing with some limitations of SSH here. You're right, a new session usually means the old one is lost. But have you tried using tmux or screen? They provide persistent sessions so you can scroll back, copy, or even toggle between different tasks without closing down everything. I know the documentation can be a bit dense, but they're really powerful once you get the hang of them. Plus, you can configure Minecraft to log everything, which might help with your needs too!

tmux is pretty awesome! Once you get used to it, you won’t want to go back!