I'm using an ssh tunnel to securely connect to a remote samba server. The command looks something like this: "ssh -f -L 139:localhost:139 root@remotehost sleep 999999". I want that to come up at boot so that I can mount remote samba filesystems automatically at boot. I've got key based authentication working (and ssh-agent via keychain
), but that still requires me to enter my passphrase after every reboot. Is there a way to save and restore keychain or ssh-agent? I suppose could use expect
to automatically enter my passphrase for me, but that would require me to store the passphrase in plaintext somewhere.