2

I'm trying to ssh via port forwarding. This is my ssh config file:

HOST A
    HostName B
    user C
    DynamicForward 0.0.0.0:1081

When I run "ssh A" I get:

channel 5: open failed: administratively prohibited: open failed
channel 7: open failed: administratively prohibited: open failed
channel 10: open failed: administratively prohibited: open failed
channel 12: open failed: administratively prohibited: open failed
....

I've seen similar questions and tested these flags in my server's ssh config but none of them worked:

PermitTunnel yes
AllowTcpForwarding yes
AllowTunnel yes
PermitOpen yes

Here is result of "ssh -v A":

debug1: channel 3: new [dynamic-tcpip]
debug1: Connection to port 1081 forwarding to socks port 0 requested.
debug1: channel 5: new [dynamic-tcpip]
debug1: Connection to port 1081 forwarding to socks port 0 requested.
debug1: channel 6: new [dynamic-tcpip]
channel 5: open failed: administratively prohibited: open failed
debug1: channel 5: free: direct-tcpip: listening port 1081 for 2001:b28:f23f:f005::a port 443, connect from 127.0.0.1 port 53584 to 127.0.0.1 port 1081, nchannels 7
debug1: Connection to port 1081 forwarding to socks port 0 requested.
debug1: channel 5: new [dynamic-tcpip]
debug1: Connection to port 1081 forwarding to socks port 0 requested.
debug1: channel 7: new [dynamic-tcpip]
debug1: Connection to port 1081 forwarding to socks port 0 requested.
debug1: channel 8: new [dynamic-tcpip]
channel 7: open failed: administratively prohibited: open failed
debug1: channel 7: free: direct-tcpip: listening port 1081 for 2001:b28:f23f:f005::a port 443, connect from 127.0.0.1 port 53590 to 127.0.0.1 port 1081, nchannels 9
debug1: Connection to port 1081 forwarding to socks port 0 requested.
debug1: channel 7: new [dynamic-tcpip]
debug1: Connection to port 1081 forwarding to socks port 0 requested.
debug1: channel 9: new [dynamic-tcpip]
debug1: Connection to port 1081 forwarding to socks port 0 requested.
debug1: channel 10: new [dynamic-tcpip]
channel 9: open failed: administratively prohibited: open failed
debug1: channel 9: free: direct-tcpip: listening port 1081 for 2001:b28:f23d:f001::a port 443, connect from 127.0.0.1 port 53596 to 127.0.0.1 port 1081, nchannels 11
debug1: Connection to port 1081 forwarding to socks port 0 requested.
debug1: channel 9: new [dynamic-tcpip]
debug1: Connection to port 1081 forwarding to socks port 0 requested.
debug1: channel 11: new [dynamic-tcpip]
debug1: Connection to port 1081 forwarding to socks port 0 requested.
debug1: channel 12: new [dynamic-tcpip]
channel 11: open failed: administratively prohibited: open failed
debug1: channel 11: free: direct-tcpip: listening port 1081 for 2001:b28:f23d:f001::a port 443, connect from 127.0.0.1 port 53602 to 127.0.0.1 port 1081, nchannels 13
debug1: Connection to port 1081 forwarding to socks port 0 requested.
debug1: channel 11: new [dynamic-tcpip]

And this is my sshd_config file:

ChallengeResponseAuthentication no
UsePAM yes
AllowTcpForwarding yes
X11Forwarding yes
PrintMotd no
Banner /etc/issue.net
AcceptEnv LANG LC_*
Subsystem sftp  /usr/lib/openssh/sftp-server
ClientAliveInterval 120
PasswordAuthentication yes
2
  • Could you edit your question to include the full contents of the server's sshd_config file? At least all of the lines that aren't commented out (all of the lines that don't start with "#").
    – Kenster
    Nov 30, 2019 at 2:41
  • @Kenster I added the file Nov 30, 2019 at 10:45

0

You must log in to answer this question.

Browse other questions tagged .