Tim's Blog

How to copy a folder on a remote server with SSH

The best tool for this task is rsync , allowing incremental transfer and compression. Use the following command: rsync -avz user@host:/remote/folder/ /local/dir If you need to specify SSH connection details, like port and key file: rsync -avz -e "ssh -p 2222 -i ~/.ssh/mykey" user@

How to grant AWS user access to a single S3 bucket

In your IAM dashboard, create a Policy with the following permission: { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "s3:ListStorageLensConfigurations", "s3:ListAccessPointsForObjectLambda", "s3:GetAccessPoint", "s3:PutAccountPublicAccessBlock&

How to up git SSH access on a new machine

Get your private key from your existing machine. In this example the key name is id_rsa cat ~/.ssh/id_rsa Copy the key content, and paste key to new machine on appropriate folder nano id_rsa Change key permissions to 400 chmod 400 id_rsa Start ssh-agent and add

Setting up Flask SQLAlchemy with PostgreSQL

Add these packages to your requirements.txt: flask Flask-SQLAlchemy psycopg2-binary Then install them from your terminal pip install -r requirements.txt In main.py: from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_cors import CORS # database connection parameters DB_HOST = 'localhost' DB_PORT = 5432 DB_

How to setup Basic Auth password authentication for NGINX

Create a *.htpasswd file. Eg: touch /etc/nginx/conf.d/nginx.htpasswd Add an user to the file: echo -n 'user1' >> ./nginx/nginx.htpasswd Generate a password to the user using openssl ultility: openssl passwd -apr1 >> ./nginx/nginx.htpasswd The above command will prompt

Tim's Blog © 2026