I am running this command: ssh -i key user@domainname 'bash -l -c "command"'

The command script calls on another script that asks for input at some point. The problem is that the prompt for the command asking for input comes after I type in the answer to the prompt, which obviously is bad because I don't know what I am responding to. How should I fix this?

1 Answer 1


Try allocating a terminal on the ssh host:

ssh -t -i key user@domainname 'bash -l -c "command"'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .