openssh port forwarding administratively prohibited

Ryan Johnson
Thu Sep 23 23:22:00 GMT 2010

  On 8:59 PM, Maring, Steven wrote:
>  From a 50K foot perspective, what I'm trying to do is punch a hole through my corporate http proxy to get to github.  By itself, cygwin, along with openssh and corkscrew, does not have a problem (i.e. remote git commands work).  However, I would also like to make use of the eGit Eclipse plugin, which unfortunately does not support the notion of a proxy.  So, I thought that if I could setup a local port forwarding I might be able to get eGit to connect ... but it isn't working.I've included the openssh, git, and corkscrew packages in my cygwin install.
> I then ran ssh-host-config, but I didn't think actually running the sshd via 'net start sshd' would be required.  The port forwarding does not seem to work either way.
> $ ssh -L -v -N
> and then try to connect from another console like this ...
> $ ssh -v -N git@localhost
> then my tunnel says ...
> debug1: Connection to port 22 forwarding to port 22 requested.
> debug1: channel 1: new [direct-tcpip]
> channel 1: open failed: administratively prohibited: open failed
> debug1: channel 1: free: direct-tcpip: listening port 22 for port 22, connect from port 1130, nchannels 2
This sounds like a vanilla ssh issue to me rather than anything 

Several things come to mind right off. First, I've seen the 
"administratively prohibited" message when there was no port forwarding 
in place at all. Not the most intuitive message, but whatever...

Second, it's often "difficult" to forward to "privileged" ports (< 
1024), though that wasn't a problem when I tested it on my cygwin install.

Finally (and probably the real issue) ssh-host-config sets things up for 
(and starts) the sshd service, which means port 22 on your machine is 
already in use and the port forwarding comes up empty-handed. Try "net 
stop sshd", or else tell ssh "-L" and see if that 
gets you anywhere (I don't use git but I assume there's a way to point 
it at ports besides the default 22). Note that connecting this way will 
mess up the known_hosts file and make ssh yell at you if you ever happen 
to ssh to localhost (or to any other machine tunneled to localhost). I 
think there are ways around this with aliases or something... man 


Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list