For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
location /:CUSTOM-PATH/ { | |
proxy_pass http://127.0.0.1:<PORT>/:CUSTOM-PATH/; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_buffering off; | |
proxy_http_version 1.1; | |
# Also requires websocket: | |
proxy_set_header Upgrade $http_upgrade; |
1) Copy ssh keys to user@host to enable password-less ssh logins. | |
ssh-copy-id user@host | |
To generate the keys use the command ssh-keygen | |
2) Start a tunnel from some machine’s port 80 to your local post 2001 | |
ssh -N -L2001:localhost:80 somemachine |
Generate openssl keys:
openssl req -x509 -nodes -newkey rsa:2048 -keyout mysqldump-key.priv.pem -out mysqldump-key.pub.pem
Create a mysql default file:
# ~/.mysqldump
[mysqldump]
host = host.here.com