Skip to content

Instantly share code, notes, and snippets.

@oakwhiz
Last active August 29, 2015 14:06
Show Gist options
  • Save oakwhiz/be9d35e593b32ed1586a to your computer and use it in GitHub Desktop.
Save oakwhiz/be9d35e593b32ed1586a to your computer and use it in GitHub Desktop.
Tunnel SSH over Layer 2 Ethernet (rough sketch)
#!/bin/sh
# Tunnel SSH over Layer 2 Ethernet (rough sketch)
# requires FIFOs, netcat, linkcat
testfun () {
read line
nc "${@}" < <(echo $line ; cat)
}
while true; do mkfifo SomeFifo ; lc -blah < SomeFifo | testfun -blah -w 90 127.0.0.1 22 > SomeFifo ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment