SSH how to auto flush before a \n

ssh

I am using this kind of commands :

ssh -i etc/ssh/vagrant vagrant@34.34.34.10 "cd floss_project; make install"

But if during the installation script, a user prompt is needed, I cannot see what is the question asked since, the CLI is not flush into the SSH before a \n.

How can I ask SSH to auto flush the prompt before the \n so I can see which answer I should give?

Edit:

To Help you to reproduce this bug, let say we have the following script:

name.py

#!/usr/bin/python
name = raw_input('Give me your name: ')
print("Hello "+name)

We decide to launch it with ssh:

$ ssh 127.0.0.1 python name.py

The curser is waiting for our input without actually asking for the wanted Give me your name:

How can I force SSH to display this information (actually to flush the STDOUT before a STDIN)

Best Answer

According to http://www.derkeiler.com/Newsgroups/comp.security.ssh/2005-03/0056.html we need to use the -t option.

$ ssh -t 127.0.0.1 python name.py