I have currently set up the ssh connection. I have generated my passkey pair and saved the proper key to the authorized_key file in my .ssh directory and I have saved the key files to the wsl machine.
My goal is to daily backup the files on my wsl machine automatically using crontab.
I have not set up the crontab script yet because I haven't figured out how to automate my ssh authentication.
I used this tutorial to set up what I have so far https://www.raspberrypi-spy.co.uk/2019/02/setting-up-ssh-keys-on-the-raspberry-pi/
I've used scp user@host:/path/to/files/ /mnt/directory/folder and this calls for the password to transfer
I've also used rsync -anv user@host:/path/to/files/ /mnt/directory/folder which basically accomplishes the same task and requires the password again (I know this is a dry run)
I followed instructions to get to this point but got lost when they indicated I needed to install winSCP to authenticate the wsl machine. Can I just install winSCP on the windows machine even though I'm running my commands through my ubuntu terminal on wsl? Do I need to install winSCP?
ssh
correctly there is no need to "sign in". You have failed to say exactly what you have done.ssh-agent
instance running, the first time you enter the password for a key it will save the key in memory for use again latter. If the key was not encrypted (ie., you don't need a password to use it) and it is in the right place it should just work.