I (very) recently posted this question in regards to tar over ssh.
The question now has an answer, and I am now asking a different question.
I run the following command to push code from my local machine to my server where it will run.
tar -cJf - ./my_folder | ssh user@example 'tar -xJf - -C ./path-to-my_folder/'
I know that with ssh
/scp
I can use sshpass -p password
to stop the command asking for my password each time. Note that I cannot use alternative methods of authentication.
Is it possible to combine sshpass
with my above command so that I do not have to enter my password continually?
In other words how should I edit the above command to include sshpass
so that I do not have to type in my password each time the above command runs?
Edit: Note the following does work
For example
sshpass -p <password> ssh ... blaa blaa
sshpass -p <password> scp ... blaa blaa