Install gems on local user folder instead of system wide

In order to test locally a Gemfile, define local path for the gems to avoid attempting to write to system-wide folders: bundle config set --local path '/home/username/.gem' bundle install

January 16, 2024 · 1 min · Pablo Iranzo Gómez

No matching key found

As you might have experienced… using a recent system to connect to a legacy one could be complicated as some insecure protocols have been disabled, with a message like: Unable to negotiate with port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss Create an entry like this in your .ssh/config file, so that insecure methods can be used to connect to a specific host: Host HostKeyAlgorithms=+ssh-rsa KexAlgorithms=+diffie-hellman-group1-sha1 PubkeyAcceptedKeyTypes=+ssh-rsa User root or alternatively on the command line:...

August 25, 2023 · 1 min · Pablo Iranzo Gómez

Upgrade Debian from buster to bullseye

I had two Raspberry Pi systems running Raspbian and they were failing to find updates for newer packages. As Debian stable was upgraded too, moving from buster to bullseye the packages failed to get the newer ones. Warning Beware as this procedure might upgrade the system but might no render a bootable Raspberry Pi A way to fix it is, to first, change references, if any, to the old codename version by running:...

July 22, 2023 · 1 min · Pablo Iranzo Gómez

Automating SSH keys loading for Ansible usage

For using Ansible it’s required to have a working set of ssh-keys already deployed. If you get a set of systems that have not been provisioned by you and are missing the SSH keys, having it fixed might take a while if doing it manually. Good news is that you can use a script in expect to cover this part: #!/usr/bin/expect -f # set Variables set password [lrange $argv 0 0] set ipaddr [lrange $argv 1 1] # now connect to remote system spawn ssh-copy-id root@$ipaddr match_max 100000 # Check for initial connection (add key of host) set timeout 5 expect "yes/no" { send -- "yes\r" } # Check for password prmpt set timeout 120 # Look for passwod prompt expect "password:" { send -- "$password\r" } # send blank line (\r) to come back send -- "\n" expect eof This script, when used like:...

March 2, 2023 · 2 min · Pablo Iranzo Gómez

Enable Libvirt rw socket on RHEL9

RHEL9 by default uses read-only socket which is not usable by some tools like Kcli… to enable it use: systemctl enable --now libvirtd.socket libvirtd-ro.socket systemctl stop libvirtd.service systemctl enable --now virtproxyd.socket virtproxyd-ro.socket systemctl stop virtproxyd.service

January 12, 2023 · 1 min · Pablo Iranzo Gómez
This blog is a participant in the Amazon Associate Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.