-   Linux - Networking (
-   -   ssh tunneling at boot without entering a passphrase (

tcort 10-09-2006 02:45 PM

ssh tunneling at boot without entering a passphrase
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.

Hangdog42 10-09-2006 03:31 PM

I would create a new set of keys, only without using a passphrase. There is a good explanation of how to do that here.

No, it isn't quite as secure as having a passphrase, but as you note, storing a passphrase for use isn't very secure either.

Brian1 10-09-2006 03:32 PM

What about setting it up as a trusted ssh connection and not require password or passphrase.


All times are GMT -5. The time now is 08:23 AM.