[clug] Why is my SSH port forwarding failing all of a sudden?

Chris Smart clug at christophersmart.com
Wed Feb 3 03:43:45 UTC 2016


On 03/02/16 13:25, Tony Lewis wrote:
>>
>> On the remote server, can you add this option then restart sshd:
>> PermitOpen any
>>
>> Then try your ssh tunnel again and tail the audit.log.
>>
>> Then ssh serverlocal
>>
>> You could also try:
>> PermitOpen "server.local:22"
>>
>> Fingers crossed!
> 
> Did all of that, and still no love.  Nothing new in behaviour, but just
> to sum it up...
> 
> The client running "ssh user at serverlocal" says:
>     ssh_exchange_identification: read: Connection reset by peer
> The client end of the terminal reports on the console:
>     debug1: Connection to port 55554 forwarding to 1.2.3.4 port 22
> requested.
>     debug2: fd 16 setting TCP_NODELAY
>     debug1: channel 12: new [direct-tcpip]
>     channel 12: open failed: administratively prohibited: open failed
>     debug2: channel 12: zombie
>     debug2: channel 12: garbage collecting
>     debug1: channel 12: free: direct-tcpip: listening port 55554 for
> 1.2.3.4 port 22, connect from 127.0.0.1 port 58315 to 127.0.0.1 port
> 55554, nchannels 13
> auth.log on the server reports:
>     sshd[731713]: Received request to connect to host 1.2.3.4 port 22,
> but the request was denied.
> 

What if the server you forward to is localhost:12345?

i.e. ~/.ssh/config:

Host tunnel
  HostName tunnel.fqdn
  Port 12345
  User tunnel
  LocalForward 55554 127.0.0.1:12345

-- 
  _
 °v°
/(_)\
 ^ ^



More information about the linux mailing list