I am trying to create an ssh connection and do some things on the remote server from within the script.
However the terminal prompts me for a password, then opens th
What you need to do is to exchange the SSH keys for the user the script runs as. Have a look at this tutorial
After doing so, your scripts will run without the need for entering a password. But, for security's sake, you don't want to do this for root users!