0

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?

New contributor
Pacco Sinbad is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
4
  • This (in so far as I can tell) is a question about Windows. What is "wsl"?
    – Milliways
    Commented Dec 13 at 21:46
  • wsl is Windows Subsystem for Linux. I am running Linux on my Windows Machine. Either way I did find the answer. I needed to create my key pair on the wsl side and use that with copy_id over to the rasp pi. from there i just needed to sign in the one time and now i have a connection that doesn't require password authentication. Commented 2 days ago
  • If you setup ssh correctly there is no need to "sign in". You have failed to say exactly what you have done.
    – Milliways
    Commented 2 days ago
  • If you are using a GUI on the linux side there is probably an 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.
    – goldilocks
    Commented 2 days ago

0

Browse other questions tagged or ask your own question.