News for hackers. Stuff that matters.
Re:Gift HN: tund - SSH to your stolen laptop by leif on Saturday December 25, 2010 @12:29AM (#2038574)
This ruby code hurts my brain, mostly because it tries to be too cute (if you want to do configuration in a ruby script, aren't you supposed to use yaml or something?). Why not just a shell script?

    #!/bin/sh
    LOCAL_HOST=localhost
    LOCAL_PORT=22
    HOST=remote.com
    USER=tunnel
    SSH_PORT=22
    FWD_PORT=2222
    OPTS=-gN
    INTERVAL=300
    IDENTITY=/etc/tund/key
    
    while true
    do
      ssh ${OPTS} \
        -p "${SSH_PORT}" \
        -i "${IDENTITY}" \
        -R "${FWD_PORT}:${LOCAL_HOST}:${LOCAL_PORT}" \
        "${USER}@${HOST}"
      sleep ${INTERVAL}
    done
Re:Gift HN: tund - SSH to your stolen laptop by aphyr on Saturday December 25, 2010 @01:03AM (#2038596)
'Cuz I plan on separating the config into YAML later.
Re:Gift HN: tund - SSH to your stolen laptop by leif on Saturday December 25, 2010 @01:23AM (#2038605)
fair enough