News for hackers. Stuff that matters.
Re:Gift HN: tund - SSH to your stolen laptop by samuel1604 on Friday December 24, 2010 @05:45PM (#2038155)
hey this is just a ruby wrapper to ssh -R or am I missing something ?
Re:Gift HN: tund - SSH to your stolen laptop by aphyr on Friday December 24, 2010 @05:48PM (#2038165)
Yup, coupled with a little init script and instructions for use. Oh, and this particular method can't be used to log into your forwarding host, due to the construction of the public key.

Only wrote the script so I could add network topology reporting as well, so it can submit local MACs. Oh, and maybe automatic wifi scans. Figure you could plug those into google's geolocation services for street-level accuracy.

Re:Gift HN: tund - SSH to your stolen laptop by logophobia on Friday December 24, 2010 @09:31PM (#2038407)
How exactly? Because that would be the interesting part of the script. Is the forwarding host chrooted/jailed?
Re:Gift HN: tund - SSH to your stolen laptop by aphyr on Friday December 24, 2010 @09:49PM (#2038422)
I do a few things.

1. The forwarding user has no group access, and not even write permission for its own home directory. 2. Shell is /bin/false, password is disabled. 3. The SSH public key format actually takes options (man ssh-keygen, -O) which allow it to only be used for port forwarding.

Usually I go through the whole chroot rigamarole, and you certainly could here, but I got lazy and I think these directions will suffice for most people.

This makes me reasonably happy about having a passwordless login to one of my servers.

Re:Gift HN: tund - SSH to your stolen laptop by rw2- on Friday December 24, 2010 @08:09PM (#2038336)
Yeah. It's yet another newbie script hyped@HN. :-(
Re:Gift HN: tund - SSH to your stolen laptop by aphyr on Friday December 24, 2010 @10:10PM (#2038438)
Heh, point taken--I banged it out in 3 hours this morning. Though I must admit laughing a little about being called a newbie! Not like I'm hard to find on github or freenode... :-)

I only submitted because a.) it takes advantage of some non-obvious ssh features I have to look up every bloody time, b.) friends have asked for it, and c.) yesterday's front-page submission about theft made it seem apropos to remind people how easy this is to accomplish.

Re:Gift HN: tund - SSH to your stolen laptop by kunley on Saturday December 25, 2010 @11:25AM (#2039050)
Yeah but why Ruby? It's what shell scripting has been invented for :)

While I admit many looong shell monstrosities are better implemented in something like Ruby, and I myself use Ruby as a scripting language of choice for anything longer that a one screen of text, this time looks like it's kind of - excuse my language - overrubyism. I understand there's a tendency of rewriting everytning in The One Beloved Language and I'm a victim of this approach myself occasionally. But seriously, this could be a shell few-liner!

Anyway thanks for advertising the idea of ssh -R tunnels, they are a neat trick!

Re:Gift HN: tund - SSH to your stolen laptop by xenophanes on Friday December 24, 2010 @08:40PM (#2038350)
It's good for newbies to make code public and start trying to participate in the community. That's how they become experts!
Re:Gift HN: tund - SSH to your stolen laptop by catch23 on Friday December 24, 2010 @09:37PM (#2038415)
What's wrong with a newbie script? Seems like people like it based on the comments here. Sometimes the most liked things are pretty simple.
Re:Gift HN: tund - SSH to your stolen laptop by rw2- on Saturday December 25, 2010 @02:20PM (#2039280)
It's Hacker News, not Newbie News.
Re:Gift HN: tund - SSH to your stolen laptop by abraham on Saturday January 01, 2011 @06:12AM (#2057500)
Everybody starts out as a newbie.