Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save butlerpeter/9739989 to your computer and use it in GitHub Desktop.
Save butlerpeter/9739989 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -x
shell='user@ssh-host-on-ipmi-network'
ipmihost='192.168.1.16'
ifalias='127.0.0.2'
ports="80 443 623 5900 5901 5120 5123 8889"
for p in $ports; do
fwportspec=" ${fwportspec} -L $ifalias:$p:$ipmihost:$p "
done
sudo ifconfig lo0 alias $ifalias
sudo ssh -v -C $fwportspec $shell
sleep 1
sudo ifconfig lo0 -alias $ifalias
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment