All Tips


14

Tip #154   Port forwarding that automatically disconnects

If you want to tunnel a long-lived connection over SSH such that the tunnel goes away when the application disconnects, try something like the following example:

Read more »
  • TAGS:

12

Tip #155   Truncated $PWD in the command prompt

The script below will truncate the $PWD to 1/4 of the terminal width and put it into the command prompt, all within the same bash process, no forks to tr and gawk.

Read more »

16

Tip #157   ssh proxy forwarding

ssh -l <login> -L <port>:<destination:port> <proxymachine> <local addy>
example
ssh -l foo -L 5000:192.168.5.2:443 192.168.1.1 https://localhost:5000/


Then go to https://localhost:<port>/ to get to destination's website; through the proxy machine.

Read more »