zoukankan      html  css  js  c++  java
  • 建立ssh tunnel的命令

    网上都是说 sudo ssh -L <local-port>:<VM IP address>:80 <your VM user>@<VM IP address> -N 

     但连上后都会出现错误

    debug1: Connection to port 80 forwarding to 192.168.1.233 port 80 requested.
    debug1: channel 2: new [direct-tcpip]
    debug1: Connection to port 80 forwarding to 192.168.1.233 port 80 requested.
    debug1: channel 3: new [direct-tcpip]
    channel 2: open failed: connect failed: Connection timed out
    channel 3: open failed: connect failed: Connection timed out
    debug1: channel 2: free: direct-tcpip: listening port 80 for 192.168.1.233 port 80, connect from 127.0.0.1 port 47645, nchannels 4
    debug1: channel 3: free: direct-tcpip: listening port 80 for 192.168.1.233 port 80, connect from 127.0.0.1 port 47646, nchannels 3
     

     最后想想把中间的ip换成自己的试一试  居然成功了。。   但这是为什么呢?不可能那么多人都错了啊。。。

     sudo ssh -L 80:127.0.0.1:80 root@192.168.1.233 -N  

    另外,备忘一下  使用ssh代理服务器的命令 ssh -qTfnN -D 7070 username@58.xx.xxx.xxx 

    端口转发: ssh -b 0.0.0.0 -fNR 59110:localhost:59155 localhost

  • 相关阅读:
    缓存一致性问题
    缓存雪崩
    mysql Replication机制
    数据库水平切分、拆库拆表
    mysql分表和分区实际应用简介
    mysql中间件
    mysql基础知识
    go语言redis使用(redigo)
    nginx location配置与rewrite配置
    PDO驱动使用
  • 原文地址:https://www.cnblogs.com/cszzy/p/2682777.html
Copyright © 2011-2022 走看看