162 points · by jaspertheghost · 17y ago · 53 comments
office$ ssh -R 9999:localhost:22 user@home ## do this in a screen for good measure
and another lesser known ssh feature:
home$ ssh -D 8888 -p 9999 user@localhost
and now you have a SOCKS proxy on home:8888 that will access everything visible to the computer named "office".
For extra credit add PingTunnel and a hotspot that happens to allow ICMP and enjoy free internet wherever you go.
fuser -fuck /dev/whatever
http://moka.ccr.jussieu.fr/doc_link/C/a_doc_lib/cmds/aixcmds...Oh, admin humor.
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.
stty sane ^j
(That's Ctrl-j there.)
You might be flying blind, but just do it and you might get your screen back.
You probably know this, but to rescue a hosed system with Knoppix or similar live-cd:
- Boot from CD.
- Open root console.
- Mount your usual root partition: mount -t somefs /dev/hda1 /mnt/oldsys
- chroot /mnt/odlsys /bin/bash
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.
How Knoppix saved the day
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)
dig mydomain.com. axfr
fuser, strace, ltrace, nc come to mind offhand.
They sound like fairly sensible abbreviations to me.
When ls utility was created standard RAM was 10KB and power computers looked like this http://images.appleinsider.com/leopard-preview-server-1.jpg
I guess if your IO interface is a real dead-tree paper then each character counts.
Man "mebibits" sounds terrible.
Hee, things I didn't think I'd ever see on ibm.com, #12234 in a series.
People with company songbooks and nice ties must be spinning in their graves
Single User Mode isn't unique to CentOS/Redhat, or even Linux. In fact, the concept behind it isn't even unique to Unix: One of Microsoft's 10 security rules is "if the bad guy has unrestricted physical access to your box, it isn't your box anymore."
edit for clarity, due to reply
GRUB doesn't change the Unix root password. GRUB--like any other bootloader--lets you boot to single user mode, which doesn't require a password. Single user mode lets you change the Unix root password.
p4ss1ng g4s 1n h3r 4ss w/ my sp34r
d4n4 d03s d1ld0s @t d4 d1ld0 st0re
d1ck r4p3d j4n3 w/ h1s d1ng d4ng