Skip to content

Instantly share code, notes, and snippets.

@coyotebush
Last active Feb 5, 2016
Embed
What would you like to do?
SSH to lab workstations, even off campus
#!/bin/sh
# adapted from: http://superuser.com/a/827803/94698
if /sbin/ifconfig -a | grep -q 'inet 129\.65\.'; then
exec nc $1 $2
else
exec ssh -xaqW $1:$2 csc
fi
host csc
hostname unix12.csc.calpoly.edu
user USERNAME
ControlMaster auto
ControlPersist 15m
ControlPath ~/.ssh/mux-%r@%h:%p
Host 12?x?? 23?x?? 25?x?? 30?x?? cslvm??
hostname %h.csc.calpoly.edu
User USERNAME
ProxyCommand cscproxy %h %p
ServerAliveInterval 60
TCPKeepAlive yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment