Tag: linux

visudo – what happens on save /etc/sudoers

I was trying to edit the sudoers file using visudo in new Ubuntu system. The default editor was set to nano as usual.

After making the changes, when I went to save the file using Ctrl+O, I noticed that it was writing it out to /etc/sudoers.tmp file instead of /etc/sudoers file.

The explanation of why it was this way was interesting. I had never really put any thought to this earlier.

Continue reading

Run caddy as a non-root user on Ubuntu

Any process can be run as a non-root user service.

The first criteria to have a service as a non-root user is to have the service be kept running even when the user is not logged in.

However, having a web server places an additional challenge – port 80 and port 443 which are basically the http and the https ports need to be bound by a user with administrative privileges because they are lower ports.

Continue reading

Ruby OpenSSL::SSL::SSLError – SSL_connect returned=1 errno=0 unsafe legacy renegotiation disabled

So, all of a sudden, one of our servers, while trying to connect to another, started giving this cryptic error –

OpenSSL::SSL::SSLError - SSL_connect returned=1 errno=0 unsafe legacy renegotiation disabled

These kind of errors are usually dependent on some system updates. But the error seemed to be coming from the target server. After a bit of searching around, this article gave the most understandable information.

From that article –

This “unsafe legacy renegotiation disabled” error happens when connecting to outdated endpoints that do not support RFC 5746 secure renegotiation. Ideally, the endpoints causing these errors should be upgraded for security reasons. 

In the same article, they mention that it should be possible to remove this security check, but the solutions mentioned there didn’t work.

Continue reading

fzf – error when pressing Ctrl+R

I’ve become a big fan of fzf since I discovered it.

However, after a recent upgrade, when I pressed Ctrl+R, I got the following error –

unknown option: --scheme=history

After some searching, found the following solution.

Remove fzf from /usr/bin/ and relink it.

Run these two commands in order –

sudo rm /usr/bin/fzf
sudo ln -s ~/.fzf/bin/fzf /usr/bin/fzf

install fzf on Linux

fzf is a serious timesaver. To be able to quickly go through past commands and in a fuzzy manner, especially when you don’t recall the exact command is a Godsend!

To install fzf on Linux, we need to

a) clone the repository into the system

git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf

b) run the command which will add the relevant shortcut keys

~/.fzf/install --all

There are a bunch of other stuff that can be done once fzf is installed. For example, to see instant file previews –

fzf --preview 'less {}'

And if there is bat also installed, then the previews can show syntax highlighting and line numbers also!

fzf --preview 'bat --color=always --style=numbers --line-range=:100 {}'

How to generate SSH Keys and avoid “Invalid privatekey” error

I’ve long been a user of DBeaver which works so well across different OSes, so recently I wanted to set up the cloud version called cloudbeaver.

In the course of doing that, I had to generate SSH keys to be able to access remote databases via SSH.

Generate an SSH keypair

The standard way of generating SSH keys is to run this command.

> ssh-keygen -t rsa

This by default creates id_rsa and id_rsa.pub under <home directory>/.ssh folder (both in Windows and Linux)

Continue reading

Copyright © 2026 the möbius trip

Theme by Anders NorenUp ↑