diff --git a/cheat/cheatsheets/convert b/cheat/cheatsheets/convert index 20dbef0..1472f4a 100644 --- a/cheat/cheatsheets/convert +++ b/cheat/cheatsheets/convert @@ -15,5 +15,5 @@ convert original-image.jpg -resize 100x converted-image.png for file in `ls original/image/path/`; do new_path=${file%.*}; new_file=`basename $new_path`; - convert $file -resize 150 conerted/image/path/$new_file.png; + convert $file -resize 150 converted/image/path/$new_file.png; done diff --git a/cheat/cheatsheets/scp b/cheat/cheatsheets/scp index 5b5ade9..aaf866f 100644 --- a/cheat/cheatsheets/scp +++ b/cheat/cheatsheets/scp @@ -3,3 +3,6 @@ scp foo.txt user@example.com:remote/dir # To copy a file from a remote server to your local machine: scp user@example.com:remote/dir/foo.txt local/dir + +# To scp a file over a SOCKS proxy on localhost and port 9999 (see ssh for tunnel setup): +scp -o "ProxyCommand nc -x 127.0.0.1:9999 -X 4 %h %p" file.txt username@example2.com:/tmp/ diff --git a/cheat/cheatsheets/ssh b/cheat/cheatsheets/ssh index aad8cb8..e6af78f 100644 --- a/cheat/cheatsheets/ssh +++ b/cheat/cheatsheets/ssh @@ -23,6 +23,9 @@ ssh -X -t user@example.com 'chromium-browser' # To create a SOCKS proxy on localhost and port 9999 ssh -D 9999 user@example.com +# To tunnel an ssh session over the SOCKS proxy on localhost and port 9999 +ssh -o "ProxyCommand nc -x 127.0.0.1:9999 -X 4 %h %p" username@example2.com + # -X use an xsession, -C compress data, "-c blowfish" use the encryption blowfish ssh user@example.com -C -c blowfish -X