B
Basudeba Mandal
Guest
I wanna write a shell script which will do remote login to a machine,
If I use ssh command to do that, It asks something like 'do you wanna continue (yes/no)' and then remote machine's password, so
there we need to input yes and next input is remote machine's password. So my doubt is,
how to give those two input(yes and remote machine's password) to the system? Can I use the below command
echo 'yes abcd' | ssh --stdin [email protected]
where 'abcd' is the password of 'user25'(user25 is an user on remote machine 192.168.1.1')
or I need to give input from file????
If I use ssh command to do that, It asks something like 'do you wanna continue (yes/no)' and then remote machine's password, so
there we need to input yes and next input is remote machine's password. So my doubt is,
how to give those two input(yes and remote machine's password) to the system? Can I use the below command
echo 'yes abcd' | ssh --stdin [email protected]
where 'abcd' is the password of 'user25'(user25 is an user on remote machine 192.168.1.1')
or I need to give input from file????