Topic: Help with ssh-over-http....or using IMAP/SMTP when its block
no photo
Tue 07/07/09 06:39 PM
As usual, I have several questions confused into one posting.

My main goal is to have a local email client (currently using ossoemail, but also want mutt & thunderbird to work) to connect w/IMAP/SMTP to gmail despite the fact that everything (except normal web browsing) seems to be, shall we say, 'not working' in my current wifi access location.

In my experience, if I can get an ssh connection, somehow or other I can figure out anything else that I want to do, by sending the data over the ssh connection (to an sshd running under my account on a remote machine).

Does anyone know an easy way to setup an ssh-over-http connection? The remote machine I can route through runs debian, uses apache (in case that matters), and there I have a normal non-privileged user account. The local machine has xandros (eee-style) & ubuntu, and I'm root.

Alternatively, is there an easy "IMAP/SMTP-over-http" solution?

Or any other ideas?

ThomasJB's photo
Tue 07/07/09 08:07 PM

I don't understand your reasoning for why you want to use ssh over http, but I found this debain program called corckscrew that claims to do just that. You can read about it here:http://wiki.kartbuilding.net/index.php/Corkscrew_-_ssh_over_https
It sounds like if all you are able to do is basic web browsing, that you have firewall ratcheted down pretty tightly. Try opening TCP port 143 for IMAP and/or port 25 for SMTP it is highly likely that you have the default port 22 used for ssh blocked also which would prevent you from using it in it's default state. First check those ports on the local machine then your remote machine.

no photo
Tue 07/07/09 08:49 PM
Edited by massagetrade on Tue 07/07/09 08:56 PM
Thomas, thank you! I actually tried corkscrew before, and I corkscrewed it up somehow. I don't remember the details, I will try corkscrew again soon and post what went wrong.

On this same machine I can ssh, etc, when connected to the net at other locations, so I don't think I have any firewall issues or ports blocked directly on my machine, nor the remote machine - I think the 'problem' is with the public network I am connecting to, and thus outside of my control.

(Also, I use three distinct OS environments (ubuntu/xandros/maemo), each with their 'default' networking configuration, and all three ssh & ping fine at certain locations, and all three have ssh/ping blocked (with http open) at this location.)

As far as "I don't understand your reasoning for why you want to use ssh over http" I might be going about this the wrong way, as I haven't figured out exactly how to IMAP/SMTP over SSH - I just know that historically i've gotten everything else to funnel over ssh that I needed, so I figured IMAP/SMTP would be a breeze if I had ssh working.

I'm absolutely open to other solutions, aside from the ssh route.

ThomasJB's photo
Tue 07/07/09 08:52 PM

Thomas, thank you! I actually tried corkscrew before, and I corkscrewed it up somehow. I don't remember the details, I will try corkscrew again soon and post what went wrong.

On this same machine I can ssh, etc, when connected to the net at other locations, so I don't think I have any firewall issues or ports blocked directly on my machine, nor the remote machine - I think the 'problem' is with the public network I am connecting to, and thus outside of my control.

(Also, I use three distinct OS environments (ubuntu/xandros/maemo), each with their 'default' networking configuration, and all three ssh & ping fine at certain locations, and all three have ssh/ping blocked (with http open) at this location.)

As far as "I don't understand your reasoning for why you want to use ssh over http" I might be going about this wrong, as I haven't figured out exactly how to IMAP/SMTP over SSH - i just know that historically i've gotten everything else to funnel over ssh when i wanted to.


Ah I understand your situation a little better now. I don't have an immediate answer, but I'll think on it and see if I can come up with anything. drinker

chrish's photo
Wed 07/08/09 01:24 AM
Why not setup a VPN?
http://openvpn.net/

ThomasJB's photo
Wed 07/08/09 08:31 AM
Try running a traceroute -p with 134 to your IMAP/SMTP server to see where you are being blocked, that should tell you if it is being blocked on the network you control or the public on that you can't control.

Here is the man page for ssh: http://www.eos.ncsu.edu/remoteaccess/man/ssh.html specifically check out the -p, -P, and -R

Have you checked out this page yet: http://dag.wieers.com/howto/ssh-http-tunneling/