I am writing a simple unix script to automate reading of a log file.The following does not give any output to the terminal. It just asks for the password for buser and then it just hangs. I understand that this is because the commands in -c of su are executed in the background. But the  logfile had some logs and i wanted to output this to terminal. Is there any way to do this. Please note I dont have the option of using sudo command.ssh -t auser@something.com ssh -t aserver su - buser -c tail -f /logfile
command line in su - and background
shell script;command line;scripting;su
This is becoming a very common issue in these days, try it in this way:  ssh -t auser@something.com ssh -t aserver 'su - buser -c \tail -f /logfile\'