phillips321

Penetration Tester and Linux fanboy!

This will allow your VNC session to run over the ssh session, just vnc to yourself

1ssh username@123.123.123.123 -L 5900:127.0.0.1:5900

This will set up a SSH SOCKS5 proxy on port 8080 (don’t forget to set your borwser proxy to socks5 8080)

1ssh username@123.123.123.123 -ND 8080

This will verbosely sync the 2 directories locally

1rsync --delete --progress --sparse -va /dir/of/source/ /dir/of/destination/

And to do the same thing over SSH:

1rsync --sparse --progress -avc -e ssh user@example.com:/dir/of/source /dir/of/destination/

This zips the directory and names it xyz.zip in

1zip -r /home/user/xyz.zip /location/of/directory

This unzips the archive

1unzip /home/user/xyz.zip

This tars the directory and names it xyz.tar in /home/user/

1tar -cvf /home/user/xyz.tar /location/of/directory

This untars the archive

1tar -xvf /home/user/xyz.tar -C /location/to/extract/to/

This tar.gzs the directory and names it xyz.tar.gz in /home/user/

1tar -zcvf /home/user/xyz.tar.gz /location/of/directory

This untars the archive

1tar -zxvf /home/user/xyz.tar.gz -C /location/to/extract/to/

This allows mounting of a remote file system over ssh. Ensure that theĀ sshfs package is installed.

1sshfs phillips321@torrenter.co.uk:/var/www /media/ssh -o allow_other

This command indentifies which process is running on which port. Displays pid and name.

1netstat -lnp