SSH端口转发,想把http://hostA:3555 映射到hostB的 http://127.0.0.1:8090
hostA的用户名是:tt
hostA上SSH服务器端口号为:44444
hostB上执行:
ssh -C -f -N -g -R 3555:127.0.0.1:8090 -p 44444 tt@hostA
可就是没法通过http://hostA:3555访问到127.0.0.1:8090的一个网页啊。。
网页代码是:
import tornado.web
import tornado.ioloop
import time
class MainHandle(tornado.web.RequestHandler):
def get(self):
print("hello!",time.asctime())
self.write("hello!")
if __name__ == "__main__":
app = tornado.web.Application([(".*", MainHandle)])
app.listen(8090)
tornado.ioloop.IOLoop.instance().start()
本地都可以访问的
请指点一下,万分感激!