Actually, I need a secured VPN, but configuring it was too hard for me. So I decided to use SSH tunnel. The tunnel could be established when I logged in. :(

(1) How can I make a SSH tunnel without login? Like daemons. And (2) how can I keep the tunnel connections reliably?

I'm using Ubuntu Server 10.04 LTS.

  1. If the server allows public key authentication, put the public key of the connecting client to the server's ~/.ssh/authorized_keys file. Use ssh-keygen on the client, the create a key pair. You may also use the ssh-copy-id script to copy the public key to the server. On key generation, you may omit the passphrase, so you won't be asked for it. Be sure to keep the private key (~/.ssh/id_rsa) safe.

  2. Use autossh to keep the tunnel alive.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.