While logging into my remote server it expects a user input, it's bash_profile is modified in such a way.
[nikhil]$ cat .bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
read -p "enter your name " Name
echo $Name
How can i login into this remote server using ssh and pass that input through script.
Install
expect
:Run following script:
Adapt following:
root@server
with your actual server connection parameters.bash_profile
on the target serverecho $$
)