Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to set up the following:

At work I want to create a local port that will forward to port 22 on my home server.

ssh -L 56879:home:22 username@home -p 443

right now I'm testing this on my two machines at home, my ubuntu server and the other my iMac.

iMac: ubuntu:

iMac -> ssh -p 443 -L 56879: username@

in my ~/.ssh/config on my iMac I have port set to 56879.

so when I do git pull remoteserver:/path/to/repo.git on my iMac git will use ssh client on my iMac and use port 56879 since setup in config which should forward to 22 on my ubuntu machine.

I keep getting connection refused? Any ideas?

share|improve this question

migrated from Nov 20 '11 at 0:49

This question came from our site for professional and enthusiast programmers.

looks like i was a bit confused on -L, its <local port>:<local address>:<remote port> – j1199dm Oct 22 '11 at 20:50
getting closer to getting my ssh port forward to work. Now getting 'channel 0: open failed: administratively prohibited: open failed'. Any one know what that means? – j1199dm Oct 22 '11 at 20:52
figured out that doing a local forward will function as an incoming forward. i think i'd have to use a proxy command or something equivalent to get my desired result. – j1199dm Oct 23 '11 at 15:12

You must log in to answer this question.