This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hello,
I'm actually pretty savvy with computers but this is one question I couldn't find an answer to online. Everything I searched lead me to different answers.
If I have a shell program on my Linux server that starts up automatically when the computer turns on, is there a way for me to log into an SSH terminal and bring that process's stout into my SSH's view? Like, I want to make any of the output that would normally be visible on the shell window running that program to be viewable on the SSH window. Maybe even show me previously output messages?
I'm running a game server and would like to monitor warnings, know when people log on, etc. without having to actually go to the computer since it's pretty much a headless unit.
​
Update: The answer that I settled on was installing screen
from apt-get. Then I made two script files:
run.sh
#!/bin/sh
screen -d -m -S mc1 /home/<logon name>/Desktop/run2.sh
​
run2.sh
#!/bin/sh
BINDIR=$(dirname "$(readlink -fn "$0")")
cd "$BINDIR"
​
java -Xms1024M -Xmx1536M -jar server1_13_1.jar -o true nogui
​
I made the run.sh a startup application in Ubuntu and it works great. I can ssh into the server using putty and then use the command `screen -r` to view the output as well as send shutdown commands, for example.
Subreddit
Post Details
- Posted
- 6 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/linux4noobs...