pyrocumulus
Cadet
- Joined
- Feb 16, 2019
- Messages
- 3
Hello,
I am using rdiff-backup on a Raspberry Pi to back up files from my FreeNAS server (11.3-RELEASE). I didn't want to install rdiff-backup directly on the freenas server so I put it in an iocage jail instead (also running 11.3-RELEASE). FreeNAS is running an ssh server but the jail is not. I suppose I could just enable sshd on the jail and bypass this whole issue but it seems like there should be a better way. I could also remove the passphrase for the ssh key but I'd rather not do that either.
Basically what I am hoping to do is connect to FreeNAS with ssh and run rdiff-backup on the jail via
Ideally this would run without asking for a key passphrase from the jail root user but it doesn't:
I added this to my .cshrc for keychain:
Keychain appears to be working:
I can manually ssh from nextcloud_jail to pi@rpi2 without a passphrase as expected.
The first time I run
I am using rdiff-backup on a Raspberry Pi to back up files from my FreeNAS server (11.3-RELEASE). I didn't want to install rdiff-backup directly on the freenas server so I put it in an iocage jail instead (also running 11.3-RELEASE). FreeNAS is running an ssh server but the jail is not. I suppose I could just enable sshd on the jail and bypass this whole issue but it seems like there should be a better way. I could also remove the passphrase for the ssh key but I'd rather not do that either.
Basically what I am hoping to do is connect to FreeNAS with ssh and run rdiff-backup on the jail via
iocage exec
. This happens via a cron job so it can't be interactive. I installed the keychain package to store the passphrase for my ssh key in the jail but I am still being asked for my key's passphrase when I try to run rdiff-backup.Ideally this would run without asking for a key passphrase from the jail root user but it doesn't:
Code:
root@freenas:~ # iocage exec nextcloud_jail rdiff-backup -v5 --print-statistics /root/test/ pi@rpi2::/home/pi/test Executing ssh -C pi@rpi2 rdiff-backup --server Enter passphrase for key '/root/.ssh/id_ecdsa':
I added this to my .cshrc for keychain:
Code:
setenv SHELL /bin/csh eval `keychain --eval id_ecdsa` source $HOME/.keychain/$HOST-csh
Keychain appears to be working:
Code:
root@freenas:~ # iocage exec nextcloud_jail ssh-agent setenv SSH_AUTH_SOCK /tmp/ssh-wwinG8eUBk8R/agent.53590; setenv SSH_AGENT_PID 53591; echo Agent pid 53591;
I can manually ssh from nextcloud_jail to pi@rpi2 without a passphrase as expected.
The first time I run
iocage console nextcloud_jail
I have to enter the passphrase for my ssh key but then keychain stores it for subsequent logins, which is how it should be. Why doesn't this work with the iocage exec
command above?