[SOLVED] SSH: Bring up running process on remote machine
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a ubuntu machine running a minecraft-server in a terminal for my daughter and her friends. I can ssh in over the lan from my slackware laptop (with X forwarding) and see it with ps:
I can't seem to find out how I bring it up on the laptop so I can administer the server. I guess I could ssh in and open a terminal on ubuntu and start the server remotely from the laptop, then I would already have it, but quite often it's already running so I need to grab it.
AFAIk there's no way to move an X program between DISPLAYs. You could connect via VNC. Or start minecraft in screen or tmux in the first place, then you can reattach to it from anywhere.
You probably want to use screen. It's too late for that process, but any new one you start can be started in screen, giving you the ability to attach and detach from it whenever you want from whatever machine you want.
Just to qualify how I solved this using screen to grab a process running on 'Server' from 'Laptop':
Starting on Laptop:
xterm # open your terminal, I use xterm
ssh Server # ssh in to Server from Laptop
screen # start screen
command # issue some command, process starts running
Ctrl-a d # detach screen
exit # break ssh connection to Server
...some time later...
xterm # open your terminal, I use xterm
ssh Server # ssh in to Server from Laptop
screen -ls # list running screen sessions
# producing:
30376.foo.Server # 30376 for example only, could be any number
screen -r 30376.foo.Server # reattach to screen session
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.