I'm writing a shell script that will respond to a prompt. For example, when I execute a file, the executed file will then prompt the user with this:
Please enter the password:
Then I want the script to automatically place something there for this prompt.
I understand "expect" is something I can use. However, I am using SSH and I do not have root on the server I am connected to and thus I cannot install "expect" there as I do not have permission.
I have two options: Either is there another way to respond to a prompt outside of expect? Or can I run a script on my local machine outside of the SSH connection and then run that script on this SSH machine?
I am trying to enter the numbers 000 to 999 (and all numbers in between) to try as the password. So I am building loops to do this( I know how to do this, I just DK how to make it respond to the prompt) , so I'm not sure if there is something outside of expect that I can do. I just want to know if there is some way to do this.