- ssh user@your_ip
- Generar llave
ssh-keygen -b 4096
(dentro de .ssh) - Enviar llave al server
ssh-copy-id -i .ssh/name.pub user@your_ip
- Conectar:
ssh user@your_ip
- update
apt-get update
// npm i axios stream-concat | |
import { pipeline } from 'stream/promises' | |
import StreamConcat from 'stream-concat' | |
import axios from 'axios' | |
const API_01 = 'http://localhost:3000' | |
const API_02 = 'http://localhost:4000' | |
const streams = (await Promise.all([ | |
axios({ |
# Make sure you have already installed apache and mysql; | |
# install rails | |
# https://help.ubuntu.com/lts/serverguide/ruby-on-rails.html | |
sudo apt install rails | |
# install comman dependencies | |
sudo apt-get install build-essential patch ruby-dev zlib1g-dev liblzma-dev make libmysqlclient-dev imagemagick \ | |
libmagickcore-dev libmagickwand-dev |
# Inspired from https://pythonprogramming.net/encryption-and-decryption-in-python-code-example-with-explanation/ | |
# PyCrypto docs available at https://www.dlitz.net/software/pycrypto/api/2.6/ | |
from Crypto.Cipher import AES | |
import base64, os | |
def generate_secret_key_for_AES_cipher(): | |
# AES key length must be either 16, 24, or 32 bytes long | |
AES_key_length = 16 # use larger value in production | |
# generate a random secret key with the decided key length |