Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I try to tunnel SMB and AFP services through SSH to acces my NAS shares on my machine. I already do it successfully with my ReadyNAS using the following command line (ran as my user on my mac) :

ssh -Nf -p 22 -c 3des-cbc USER@SERVER -L 8888/ -L 9999/

but I cannot reproduce the same with the Synology NAS. Connecting using this command gives me the following error :

channel 4: open failed: administratively prohibited: open failed

I also tried with a windows client (used bitvise tunneler): it works with the ReadyNAS but not the Synology and get the following error msg :

server denied request for client-side server-2-client forwarding on

I modified /etc/ssh/sshd_config :

MaxSessions 10
PasswordAuthentication yes
PermitEmptyPasswords no
AllowTcpForwarding yes
GatewayPorts yes
PermitTunnel yes

Is there any way to make it work ? I must add that I can successfully connect via SSH to the NAS so I donnot think this is a firewall issue between the Synology and my computer.

Thanks for you answers

share|improve this question

1 Answer 1

It seems that you either need to connect as root or have to put "AllowTcpForwarding yes" into a match block for the respective user.

Are your modifications in the match block for root?

share|improve this answer
The lines I paster in my question are not in any user matching block, they currently apply to all, I also tried connecting as root and it doesn't change anything –  dvkch Feb 8 '13 at 18:01
I can include all my configuration if it helps –  dvkch Feb 9 '13 at 0:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.