Not today...

comments

Snippet

The wild kubectl logs issue

A quick post to present one of my finding during my Kubernetes journey. It may help people since it took me some time to find this out. I am currently using Kubernetes a lot for my job. I am part of the infrastructure team and need to debug some setups. I am using kubectl logs extensively and I found a few interesting options I’d like to share. Most of the time you will have multiple containers handling requests and you want to see what is happening in all of them. Read More...

Tagged kubernetes , admin , cli

comments

Project

Introducing Janus (SSH Agent written in Go)

Why this project I am currently using gopass to store and share my passwords. I was relying on GPG to handle the encryption side of the process. Then a colleague of mine introduced me to age. This encryption specification allows the use of SSH keys and specifically the ED25519 ones. I decided to make the switch and moved all my stores to age encryption. I am protecting my private key with a password and only loading it inside my agent. Read More...

Tagged dev , golang

comments

Snippet

Golang SSH tunneling

I already did an article around Golang and SSH previously, since it is a huge part of my current work. Today, I will share a small snippet which can be quite handy when automating stuff. This is how to perform a SSH tunnel using Golang. I will not explain what it is or what it is useful for, if you need more details please check the doc. In this tutorial, I will use the official SSH library from Google. Read More...

Tagged dev , golang

comments

Tuto

Wireguard on a Linux Alpine with Docker

For most of my infrastructure, I am now using Alpine Linux. I like it because it only has a small number of moving parts. It’s easy to know and master them, it is making my life easier :). So, I decided to install one on my VPS. Like my distro I wanted it to be simple and small. For all those reasons I went for Wireguard. The fact that it is the new cool kid, may also have helped. Read More...

Tagged alpine , admin

comments

OS

Bash process substitution failure

This is just a problem I encountered running my Alpine box, so I publish the fix for others to not loose time like I did. I had a software that came with a bash script and got a problem when I tried to run it. It was failing with the following error: fopen: No such file or directory I added the magical set -x line at the beginning to understand what was going on. Read More...

Tagged bash

comments

Snippet

RSA OAEP in Go and Openssl equivalent

From time to time you write some code to deal with data that will be stored somewhere on a drive. When debugging it may be nice to have “shell” commands to mimic code and help understanding what is going on. When it comes to encryption the swiss army knife you will most probably have in your shell environment is openssl. But reading and understanding the documentation can sometimes be “challenging”. Read More...

Tagged golang , bash

comments

Snippet

Golang SSH, marshalling, unmarshalling

Golang is a wonderful language to deal with the SSH protocol. It’s mostly due to the SSH library which is pretty exhaustive. However, when I had to deal with external requirements like SSH Agent or OpenSSH I experienced a lack of example and struggled a bit interfacing. In this article we will see how to exchange keys between a program written in Go and those tools using files. This means to output our keys in a proper format (marshaling) and being able to read them (unmarshalling) from the external tool format. Read More...

Tagged golang , dev

comments

Tuto

Gopass

A pretty good security advice would be to never write down a password unencrypted on disk. This can be pretty tricky to achieve, especially on personal and development environments. So let me introduce gopass which is a tool aiming to help with this problem. First of all, let me say it right away, the CLI interface is not that good. Took me a lot of time to set things properly as options may be cryptic and behavior is not obvious as first sight. Read More...

Tagged admin , cli

comments

OS

Alpine on a Raspberry (part 2)

I had to buy a new raspberry (the old one did not survive :p), a version 3 A+. Now, I will go over again the installation process. Since I encountered a few new problems. Setup SD Card This is exactly the same as the previous version. So I let you check out the other article. First boot and in-memory setup Here a few changes, using a version 3A+ requires to setup the wifi. Read More...

Tagged admin

comments

OS

Alpine on a Raspberry

Lately, I decided to re-install my old Raspberry Pi (version 1, yes I’m that old) to create a small home server. Since I am using Alpine and liking it quite a lot, I wanted to install it on my new little toy project. I followed documentations and tutorials ( here and here) and finally succeeded. I am now writing it down so I remember what has been achieved. Setup SD Card This one was quite tricky because if anything is not exactly what is expected your raspberry will never boot! Read More...

Tagged admin