Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

  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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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