First of all, I am well aware of that there are many of questions regarding this topic. I have read them, but still could figure out an appropriate answer for my situation.
I would like to scp
the entire ~/cs###/assign1
dir from local to school home dir with a shell script. My question is, is there a way in my script to wait for the password prompt, and then simulate key board event to 'type' in my password?
here is a really detailed guide of how to set up the key
Use "sshpass"!
#!/bin/bash
sshpass -p "password" scp -r /some/local/path [email protected]:/some/remote/path