如果ssh端口转发时候-g没有效果解决方案

-g Allow remote hosts to connect to forwarded ports.
在-L/-R/-D参数中,允许远程主机连接到建立的转发的端口,如果不加这个参数,只允许本地主机建立连接。


其实这是ssh默认的安全策略所致

修改配置文件 HiRoot@bt:~#vi /etc/ssh/sshd_config

在文件最后加入 gatewayports yes 


保存退出,重启启动SSH

HiRoot@bt:~#/etc/init.d/ssh restart

posted @ 2012-05-16 13:04  y0umer  阅读(261)  评论(0编辑  收藏  举报