by p3ll0n · 16y ago · 0 comments
1. Comparing local and remote files
$ ssh user@123.4.5.6 "cat /tmp/remotefile" | diff - /tmp/localfile
2. Outputting your microphone to a remote computer's speaker
dd if=/dev/dsp | ssh -c arcfour -C username@host dd of=/dev/dsp
diff <(ssh user@host cat remote-filename) local-filename
is a bit more intuitive too. You can put anything that writes to stdout in the <(), too. (Useful for decrypting or decompressing on the fly.) $ ssh user@host "tar cvzf - /path" | tar xvzf - /pathAlso - another trick is to give it -c blowfish to use a lighter/faster cipher for the transfer to save on CPU time.
$ scp -r user@host:/path /path
This is especially bad if you have a directory structure that references a higher-level directory.
We found a lot of fun sounds to blast at him while he slept. :)