[SATLUG] Multitail via SSH

c P sargonemail at gmail.com
Mon Nov 1 21:40:27 CDT 2010


> I don't want it tailed out to a TTY, I want it "protected" in some way.
> Do you think there is a way to redirect the output of multitail to a place that could
> only be accessible via a SSH login, perhaps by tying the multitail
> output somehow to a command that runs as the shell when the user logs in?
> David

Ok, Dave,
Looking at this from a scripted one-liner, what you want can be done
(assuming ssh is setup correctly) as a command line:
ssh ${QUESTIONS} 'multitail ${MORE QUESTIONS}' ${YET MORE QUESTIONS} &
See prior postings for question to ask to fill in the variables (or
check out the url/man pages!)
It's protected, multitail output is redirect to the box you started
ssh on, you login using ssh which runs multitail.  It's quicker to
setup than the other posted stuff, once questions are asked. :)
Yes, there are specific options to get this to work/work correctly on
the command line.

Craig

------------------------- cut -------------------------------------------
#!/bin/sh
echo -n "Enter the machine name to view logs on. "
read HOST ; echo "Starting multitail of ${HOST}."
#
#multitail config file of ${HOST} is used!
#
#Use the following in .screenrc to startup a "host per tty"
# with screen (removing the xterm stuff of course).
#  OR
#Host per xterm!
#
ssh ${ASK} 'multitail ${ASK0}' ${ASK1} &

exit ${ASCII}


More information about the SATLUG mailing list