Useful Linux commands, with no particular order
sudo lsof -i:port
sudo kill -9 PID
du -hs .
df -h
More info: https://www.ssh.com/ssh/tunneling/example/
ssh-copy-id user@server
ssh -L local-port:localhost:remote-port user@server -N
Note: AllowTcpForwarding
and PermitOpen
have to be enabled in /etc/ssh/sshd_config
ssh -N -T -R local-port:localhost:remote-port user@server
scp -r /folder/to/upload user@server:/destination/on/server
tar -czvf file.tar.gz file/or/folder/to/tar/
tar -xvf file.tar.gz
gpg -c --cipher-algo AES256 file/to/encrypt
You will be asked to enter a password
gpg file/to/decrypt
You will be asked to enter a password
More: https://gist.github.com/mikecrittenden/fe02c59fed1aeebd0a9697cf7e9f5c0c
wget \ --mirror \ # Makes (among other things) the download recursive. --page-requisites \ # Get all assets/elements (CSS/JS/images). --adjust-extension \ # Save files with .html on the end. --span-hosts \ # Include necessary assets from offsite as well. --convert-links \ # Update links to still work in the static version. --restrict-file-names=windows \ # Modify filenames to work in Windows as well. --domains yoursite.com \ # Do not follow links outside this domain. --no-parent \ # Don't follow links outside the directory you pass in. yoursite.com/whatever/path # The URL to download
openssl req \ -x509 \ -newkey rsa:4096 \ -sha256 \ -keyout mykeyname.key \ -out mycertname.pem \ -days 365 -nodes # only if you need no password