xinetd launched ssh port forwarding
Hello. I would like to be able to send email using my school account from off campus, which is normally blocked by their firewall. I have been using port forwarding to accomplish this, for example:
I do <I>ssh -L 25:mailserver:25 me@mailserver</I> to forward local port 25 to port 25 on their mail server. I then configure my email client to use localhost as the SMTP server.
This has been working just fine, however, I would rather not have to establish the ssh connection before being able to send mail. Ideally, I would like to have xinetd listen for connections on port 25, and then open the ssh connection when it detects one. I have been reading about xinetd, but I have not been able to accomplish this. I have been able to make xinetd establish the ssh connection in response to a port 25 access, however, ssh complains that the port is in use and cannot forward it.
I've also had xinetd open the ssh connection on a different port and then redirect the connection to it, which doesn't seem to work either. In this case, I'm not sure why.
If anyone has any suggestions or ideas, I'd really appreciate them.