Skip to main content

Posts

Showing posts from December, 2017

Basic Set Up Encrypted Swap on LMDE 2

Encrypted swap is essential if your usage sometimes require extra bit of memory on the legacy or solid state harddrive which happens to be fully encrypted. In this post, i will briefly go through the steps in setting up encrypted swap partition on Debian GNU/Linux OS (Linux Mint variant) with a sysV init system. To begin, let's save any changes to your work and check if the swap partition is in use using command ' free -m '  and deactivate the existing non-encrypted swap partition using command ' sudo swapoff -a '. Next step is to initialise the (yet to be encrypted) swap partition as a LUKS formatted partition using ' sudo luksFormat /dev/sdaX ' for a legacy harddrive where sd is the prefix for a sata interface connected harddrive, a is the English letter name convention for the first harddrive detected as such, and X is the Indian numerical name convention for partition to be used as swap. We will need to enter a password or passphrase for the setti

Hardening Edgerouter ER-X by SSH

Generating RSA keys on client device (e.g. Ubuntu 16.04 LTS): ssh-keygen -t rsa which will store key in $HOME directory. Then, prompt for passphrase will appear, but we will keep it empty. The ssh key pair is generated where id_rsa.pub is the public key (we can share with the public) and id_rsa is the private key (we shall keep it secret as long as we can) Copying public SSH key from client to router (server): scp ~/.ssh/id_rsa.pub username@router.current.ip.address:/home/username/.ssh For e.g. the username is edgemax and the router ip address is 192.168.1.1, the command would be: scp ~/.ssh/id_rsa.pub edgemax@192.168.1.1:/home/edgemax Alternatively, we use ssh-copy-id to copy the key to ~/.ssh/authorized_keys :   sudo ssh-copy-id -i .ssh/nvy_rsa.pub navoyjw@192.168.0.1 Setting ownership to username (better) if the owner of the files are not under you (check ownership or username using "ls -la /home/username/" ) as you do not need to access files as a root