-1

This question: Multitail over ssh helped me to multitail from a remote location.

But my problem is one step deeper:

I need to run "sudo su" before I can tail the files.

How can I change user to su before I tail the file with

multitail -l "ssh dev-04 tail -f /opt/app/app.log"

1 Answers1

1

Doing sudo su is redundant , You must be able to do sudo tail

Advice , before run a complex complex , try always the simple version

so:

ssh dev-04 sudo tail -f /opt/app/app.log

if this is work you can run :

multitail -l "ssh dev-04 sudo tail -f /opt/app/app.log"
EchoMike444
  • 3,045
  • 1
  • 11
  • 14
  • Beautiful! Just one small correction - I needed a tty to run sudo, so the final command was multitail -l "ssh -t dev-04 sudo tail -f /opt/app/app.log" Thanks for the help! – Somaiah Kumbera Oct 31 '19 at 07:02