News for hackers. Stuff that matters.

dramaturg

Re:Show HN: Top books mentioned in comments on Hacker News on Friday August 26, 2016 @12:45PM (#12367464)
+1 for RSS
Re:SSH Proxy Commands that use `sed` on Monday March 30, 2015 @03:49PM (#9292104)
I once made the following while drunk a few years back. It was a nerd-dare...

  # dark magicks for hopping hosts. first version
  # (you'll need to specify target user name though)
  Host *+*
        VerifyHostKeyDNS=no
        ProxyCommand	ssh $(echo %h | sed 's/^\([^+]*\).*$/\1/') nc $(sed -n '/^Host[ \t]*\('$(echo %h | sed 's/^.*+\([^+]*\)$/\1/')'\)$/,/^$/{/^.*HostName[ \t]*/{s///; s/[ \t]*$//; h}}; ${x; /./{p; b}; s/^/'$(echo %h | sed 's/^.*+\([^+]*\)$/\1/')'/p}' ~/.ssh/config) $(sed -n '/^Host[ \t]*\('$(echo %h | sed 's/^.*+\([^+]*\)$/\1/')'\)$/,/^$/{/^.*Port[^0-9]*/{s///;s/[ \t]*$//;h;};};${x;/./{p;q;};s/^/22/p;}' ~/.ssh/config)