From 9f97125ecece2e12fb923b61067b13cc015cb922 Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Mon, 25 Feb 2019 16:56:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B8=B8=E7=94=A8=E7=9A=84?= =?UTF-8?q?=20ssh=20=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- languages/bash.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/languages/bash.sh b/languages/bash.sh index 41d493e..7426eec 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -1,6 +1,6 @@ ############################################################################## # BASH CHEATSHEET (中文速查表) - by skywind (created on 2018/02/14) -# Version: 45, Last Modified: 2019/02/13 12:15 +# Version: 46, Last Modified: 2019/02/25 16:53 # https://github.com/skywind3000/awesome-cheatsheets ############################################################################## @@ -756,6 +756,15 @@ lsof -P -i -n | cut -f 1 -d " "| uniq | tail -n +2 # 在 .bashrc / .bash_profile 中加载另外一个文件(比如你保存在 github 上的配置) source ~/github/profiles/my_bash_init.sh +# 反向代理:将外网主机(202.115.8.1)端口(8443)转发到内网主机 192.168.1.2:443 +ssh -CqTnN -R 0.0.0.0:8443:192.168.1.2:443 user@202.115.8.1 + +# 正向代理:将本地主机的 8443 端口,通过 192.168.1.3 转发到 192.168.1.2:443 +ssh -CqTnN -L 0.0.0.0:8443:192.168.1.2:443 user@192.168.1.3 + +# socks5 代理:本地监听 socks5,把 socks5 的链接请求通过远程主机转发出去 +ssh -CqTnN -D localhost:1080 user@202.115.8.1 + # 终端下正确设置 ALT 键和 BackSpace 键 http://www.skywind.me/blog/archives/2021