This is to follow up on this thread: Automatically enter SSH password with script
In my case, i cannot use sshpass, i cannot use expect, I just need to script it as if no other packages are installed on the end user machine.
I want to ssh through a shell script and expand the password but it does not work.
So, using a shell script, let's say I create those variables:
_USER='Joebloe'
_MACHINE='1.1.1.1'
_PASSWORD='Password'
Then, the goal is just to ssh and pass the password:
ssh $(echo $_USER)@$(echo $_MACHINE) ##That works fine
Then, it prompts for the password:
Joebloe Password:
But I cannot say echo $_PASSWORD or even $(echo $_PASSWORD) because it takes the values literally.
Is there a way to expand the password as soon as you type it, or before it is processed, or it is not doable through a shell script?
Thanks a lot