Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On my office windows XP laptop I use a program called Bitvise Tunnelier to establish ssh tunnel to a in-house MySQL database. In the Tunnelier program I also need to provide address of corporate http proxy server in order to establish tunnel.

On my personal mac laptop, I use Cisco Anywhere client to establish a VPN connection to my corporate network. But i'm unable to establish ssh tunnel to mysql database using ssh. How do I specify the proxy server address in the ssh command?

As additional info when i'm using office laptop (whether in home or office) I can successfully ping to the server address specified in the Tunnelier program. But i cannot ping the same server using my mac machine (even after connecting via VPN).

So basically i'm unable to understand what's going on and what steps i can take to debug this problem .

share|improve this question

1 Answer 1

But i'm unable to establish ssh tunnel to mysql database using ssh. How do I specify the proxy server address in the ssh command?

There are a lot of ways to use SSH tunnels. I use them shamelessly, and for insane things. I've found them to work exactly the same on OSX as on Linux. I can see how you may have a problem if you're trying to open a local port number under 1000, which requires admin rights.

You can tell ssh to open a SOCKS proxy through to the other side with a local port of, say, 5000, as follows:

ssh elduderino@thebowlingalley.com -D 5000

With that open, you could then tell local clients to use a SOCKS proxy at 127.0.0.1:5000.

I typically use port forwarding, with ssh, like this:

ssh elduderino@thebowlingalley.com -L 5000:192.168.1.10:3389

In that case, I'd be trying to open a local port (127.0.0.1:5000) that I could point local clients at, that would then get connected to the RDP port (by convention) on the local IP 192.168.1.10 over at thebowlingalley.com. This is how I remote desktop in to windows machines. You can also use DNS names instead of IPs, if your remote SSH host machine can make sense of them.. Thus that last one would look like:

ssh elduderino@thebowlingalley.com -L 5000:donnyscomputer:3389

I think that answers your question??

share|improve this answer
    
I also often remotely test to see if the ports I'm trying to connect to are even open. Cause that kind of matters. I try things like telnet 127.0.0.1 3465 - if it doesn't fail, then port 3465 (in that case) is open for TCP connections. –  Doc Nov 15 '12 at 23:06

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.