2

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?

3

Try allocating a terminal on the ssh host:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.