Category Archives: linux

Create reverse tunnel with autossh and systemd

Install autossh with sudo apt install autossh Create autossh.service in /etc/systemd/system/ folder The content of autossh.service: [Unit] Description=AutoSSH service for a reverse tunnel from SERVER to localhost After=network-online.target # start after DNS ready, but seems no difference with network-online.target #After=nss-lookup.target [Service] ExecStart=autossh -M [LOCAL_PORT] -N -D [YOUR_LOCAL_IP]:[LOCAL_PORT] -i [YOUR_PRIVATE_KEY] [REMOTE_USER]@[REMOTE_USERVER] RestartSec=5 Restart=always [Install] WantedBy=multi-user.target Execute… Read More »

Bluetooth mouse won’t connect after reboot/sleep on Ubuntu 18.04

System & hardware: OS: Ubuntu 18.04 LTS Mouse: Logitech M337 Symptom: After reboot/sleep, Bluetooth mouse won’t get connected again. Need to remove and pair again to make it work again. Steps to solve this problem: 1. Update bluez. sudo add-apt-repository ppa:bluetooth/bluez sudo apt install bluez 2. Remove paired mouse. (If it is paired before) 3.… Read More »