發表文章

目前顯示的是 12月, 2013的文章

SSH Reverse Tunnel

很實用的指令,所以特別紀錄下來。其實這東西我碩士班的時候就已經有在用了,用的理由很簡單,只是為了要連回學校下載 paper,而下載 paper 要使用瀏覽器,所以透過這個招式連到防火牆後面的遠端桌面。什麼?你問我怎麼不使用學校的 proxy,天曉得?那時候就是沒想到嘛!不過那時候是用 putty,現在把指令紀錄下來,以供未來的自己查詢。 指令如下: ssh -NfR 7777 : localhost : 22 id@myhost.com -N: Do not execute a remote command.  This is useful for just forwarding ports (protocol version 2 only). -f: Requests ssh to go to background just before command execution. -R: [bind_address:]port:host:hostport Specifies that the given port on the remote (server) host is to be forwarded to the given host and port on the local side . 我同事 Peter 教我一個好記的方式: Need for Reverse.