It’s important to set the permissions on .ssh folder. If you allow too much access your connection will be refused. If you don’t have enough permissions you may lock yourself out.

The below script works for setting the folder and private/public key pairs in the folder:

chmod 700 ~/.ssh
chmod 644 ~/.ssh/authorized_keys
chmod 644 ~/.ssh/known_hosts
chmod 644 ~/.ssh/config
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/
chmod 600 ~/.ssh/any_other_private_key
chmod 644 ~/.ssh/



Sometimes it makes sense to tunnel all traffic through VPN. With UFW it is simple to achieve on a Linux box with the following commands:

sudo ufw allow in to
sudo ufw allow out to
sudo ufw default deny outgoing
sudo ufw default deny incoming
sudo ufw allow out on tun0 from any to any
sudo ufw allow in on tun0 from any to any

Disable IPv6

As IPv6 doesn’t do very good with VPN disable it by the following steps:

  1. Edit /etc/sysctl.conf

     sudo nano /etc/sysctl.conf

    and add the following lines:

  2. Edit /etc/default/ufw

     sudo nano /etc/default/ufw

    and set IPV6 to “no”

Finally enable UFW:

sudo ufw enable


On Raspberry Pi UFW doesn’t start automatically after reboot. To fix that issue:

  1. Edit /lib/systemd/system/ufw.service

     sudo nano /lib/systemd/system/ufw.service
  2. Add the following line to the [Unit] section:


Reboot Raspberry Pi and type

sudo ufw status

It should show status as Active and the rules we defined earlier.



Right next to my laptop I have a Raspberry Pi 4 with a touchscreen connected to it. The screen sits idly for most of the time so I thought I could make some use of it and decided turn it into a digital picture frame using its screensaver.

I have Raspbian Buster with Recommended Software version installed on the Pi but it didn’t have screensaver installed. It can be easily installed though:

sudo apt-get install xscreensaver

The next step is to install slideshow add-on for the screensaver:

sudo apt-get install xscreensaver-gl-extra

Then I uploaded some pictures to the pi from my laptop:

scp -r /Local/Path/To/Pictures  pi@

Then on the Pi I opened screensaver options and pointed to /home/pi/Pictures/PhotoDB folder. After fiddling with the time settings to my liking my picture frame was up and running:

Another option is to use Gnome Desktop’s tool called eog which first should be installed

sudo apt-get install eog

Then can be run as

eog --slide-show /path/to/picture_directory

But this program lacks options that XScreenSaver has.