| |
    今天需要临时展示一个样例站点,上传程序太麻烦,修改起来也不方便,而电信宽带没有公网ip,只能先在电脑上用ssh连接到服务器,在服务器开个端口映射到电脑上。

    运行了ssh -Ng -R "*:2222:*:3333" server

    发现在服务器端映射端口是成功了,但只是监听在本地。改了半天也不行,百思不得其解。因为之前用过都是成功的。


    后来发现某些版本的sshd因为安全性考虑,默认只允许监听在本地。

    需要在/etc/ssh/sshd_config里面加一句:
    GatewayPorts clientspecified


    即可
Tags: ,
by snooda | 分类: linux操作系统 | 评论(0) | 引用(0) | 阅读(5712)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]