A protocol
ssh username@server_ip
Instead of typing password every time, we use SSH keys.
Generate SSH key on your local machine:
ssh-keygen -t ed25519 -f deploy_key
# ssh-keygen : cmd to generate a new SSH key pair
# -t ed25519 : modern type of SSH key algorithm
# -f deploy_key : custom file name, to save the key in local
Get two files on local:
C:\\Users\\Minhen\\.ssh\\
id_ed25519 (PRIVATE KEY)
id_ed25519.pub (PUBLIC KEY)
Copy public key to VPS:
mkdir -p ~/.ssh
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys
Will into a text area, then paste contents of deploy_key.pub into it