Centos – SSH Tunnel: channel 3: open failed: administratively prohibited

centossockssshtunnel

I have two servers, let's say server A and server B. I wish to use server B as an ssh tunnel so on server A I did this

ssh -D 1080 root@ip

It connects and as soon as I put in the server B as a SOCKS5 proxy on my server A, the server B comes up with this erorr:

channel 3: open failed: administratively prohibited

Some how if I get server B from a host like vultr, I don't get this error but if I get it from digitalocean I get this error. I did some research and saw I should allowtcpforwarding to be yes but I could not find it in /etc/ssh/ssh_config

This is my ssh_config file:

# Host *
#   ForwardAgent no
#   ForwardX11 no
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   IdentityFile ~/.ssh/id_ecdsa
#   IdentityFile ~/.ssh/id_ed25519
#   Port 22
#   Protocol 2
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com
#   RekeyLimit 1G 1h

Would appreciate if someone could tell me what am I doing wrong :3

Best Answer

The config file you need to edit is called sshd_config you wrote ssh_config. What you have listed looks like the contents of the ssh client default configuration, not the config for the ssh server (/etc/ssh/sshd_config)