Trick 5 (opening a remote port on a "public" machine to connect back to your local machine) is great. Combine it:<p>office$ ssh -R 9999:localhost:22 user@home ## do this in a screen for good measure<p>and another lesser known ssh feature:<p>home$ ssh -D 8888 -p 9999 user@localhost<p>and now you have a SOCKS proxy on home:8888 that will access everything visible to the computer named "office".<p>For extra credit add PingTunnel and a hotspot that happens to allow ICMP and enjoy free internet wherever you go.
When I was doing AIX administration, I liked that one command to kill processes with open files keeping a mountpoint mounted was:<p><pre><code> fuser -fuck /dev/whatever
</code></pre>
<a href="http://moka.ccr.jussieu.fr/doc_link/C/a_doc_lib/cmds/aixcmds2/fuser.htm#a30794a1" rel="nofollow">http://moka.ccr.jussieu.fr/doc_link/C/a_doc_lib/cmds/aixcmds...</a><p>Oh, admin humor.
Very nice collection. A tech at the datacenter that hosts one my servers showed me trick #3 and I remember being thrilled sitting there watching him do stuff on my server and sharing the keyboard to type messages back and forth in vi.<p>My company uses trick #5 as a primary feature for accessing the remote Linux machines that our product is built upon. We have it set up so that every single machine automatically creates a reverse SSH tunnel to the server on boot, so that the tunnel is always accessible in case we need it. Very cool stuff.
To get back a hosed screen, also try:<p>stty sane ^j<p>(That's Ctrl-j there.)<p>You might be flying blind, but just do it and you might get your screen back.<p>You probably know this, but to rescue a hosed system with Knoppix or similar live-cd:<p>- Boot from CD.<p>- Open root console.<p>- Mount your usual root partition: mount -t somefs /dev/hda1 /mnt/oldsys<p>- chroot /mnt/odlsys /bin/bash<p>Showed that to another admin who'd lost a production box, and his chin kind of hit the floor :) I gifted him the Knoppix disk... You can also use that to reset passwords (as per the article), by editing /etc/shadow or /etc/passwd in the /mnt/oldssys directory.
great list! I especially liked the tip about sharing a screen session, been wanting a solution like that many times!<p>another great tip is how to list all subdomains on registered (not all dns servers allow this, many times you need to be on the same network, or it isn's allowed at all, but for solving you own dns issues it's a boon)<p>dig mydomain.com. axfr
<i># while [ 1 ]; do echo "All your drives are belong to us!"; sleep 30; done</i><p>Hee, things I didn't think I'd ever see on ibm.com, #12234 in a series.<p>People with company songbooks and nice ties must be spinning in their graves