SSH Tunneling for Email
I'm trying to set up an SSH tunnel to allow myself to use an SMTP server which is behind a firewall. I have an SSH server also behind the firewall that has access to the SMTP server.
So, I ran this command:
ssh -C -f user@ssh_server_ip -L 25:mail_server_ip:25
It asks me for my ssh user's password. I enter it an it appears to work.
Then, I do a telnet mail_server_ip 25 and I get this:
220 relay.wanderingwifi.com ESMTP (99ec4d3757fa03f4260acf938ff158fa)
I'm at a Caribou and obviously behind a proxy. Am I not going to be able to get this to work?
If I understand the network layout correctly, if you don't run ssh and do the telnet command then you will get the same thing. Is that correct?
Try "telnet localhost 25" after setting up the tunnel. What the -L option does is open a port on your own computer that routes incoming traffic out on the ssh server aimed at the IP specified in the option. To take advantage of that tunnel you have to connect your programs to localhost.
What is a Caribou?
Let us know how you get on,