If your problem with using an SSL certificate is that they cost money, self-signed certificates are free and provide exactly the same encryption. Tutorials are easy to find.
If you are using curl, you can use the
-k option to not require that your server's SSL key is signed by a CA. The wget version of this option is
Dom's solution will work however you will need to stay logged in or disown the ssh process from the current shell or else the tunnel will go away when you disconnect.
One method is to use
nohup in front of the ssh command.
Another is to background the ssh process and then disown it. You can background an ssh connection by typing
~^z (That's a tilde followed by a ctrl-z) then use
bg to start it running again in the background and
disown to separate the ssh tunnel from the shell.
I'm not sure exactly how that escape sequence works with chained ssh connections. I suspect you will need to type
~~^z if you have used ssh to connect to server1 before using ssh to set up a tunnel between the two servers.
You may also want to use something like Autossh to restart the tunnel if it dies. Firewalls and random network outages can easily cause the tunnel to break even if the process is still alive.