Host internal-*.example.net
ProxyCommand ssh -T external.example.net 'nc %h %p'
Used to ssh internal-dev.example.net
mount -t tmpfs tmpfs /mnt -o size=1024m |
sudo strings /dev/mem |
netcat -u host port | |
# netcat -z -v domain.com 1-1000 | |
# -z just checks connection |
#!/usr/bin/env python | |
import sys,socket,struct,time | |
sys.stdout.write(struct.pack('!IHHIIII',0xa1b2c3d4,2,4,0,0,65535,1)) | |
s=socket.socket(socket.PF_PACKET, socket.SOCK_RAW, socket.htons(0x3)) | |
while True: | |
t,p=time.time(),s.recvfrom(65535) | |
ts=int(t) | |
tu=int((t-ts)*1000000) | |
sys.stdout.write(struct.pack('!IIII',ts,tu,len(p[0]),len(p[0]))+p[0]) |
echo u > /proc/sysrq-trigger |
git log --format="%an %ae" | sort | uniq |
Host internal-*.example.net
ProxyCommand ssh -T external.example.net 'nc %h %p'
Used to ssh internal-dev.example.net
Use SSH's escape sequence <enter>~<shift>+c
user@sshhost $ ~C
ssh> L8080:localhost:8080
Forwarding port.
user@sshhost $ ~C
ssh> KL8080
#!/bin/bash | |
# Do some stuff | |
function finish { | |
# Your cleanup code here | |
} | |
trap finish EXIT |
NORMAL=$(tput sgr0) | |
GREEN=$(tput setaf 2; tput bold) | |
YELLOW=$(tput setaf 3) | |
RED=$(tput setaf 1) | |
function red() { | |
echo -e "$RED$*$NORMAL" | |
} | |
function green() { |