Import Data

If like me there are filters on your routers so you can only log in from certain machines or subnets you may need to set up a tunnel to perform snmp operations remotely. You can perform this using ssh,
#!/bin/sh
#
# usage: nomad-topology IP COMMUNITY COMMUNITY ...

if [ 1$NOMAD_DIR = "1" ] ; then NOMAD_DIR=$HOME/.nomad ; fi
mkdir -p $NOMAD_DIR/topology

IP=$1
shift 1;

ssh remoteid@remotehost nomad-topology $IP $*
scp -q remoteid@remotehost:$NOMAD_DIR/topology/$IP $NOMAD_DIR/topology/$IP