Manage SSH-keys with the SSH-agent

Many webservices generate ssh keys to access their service. With the amount of services the number of SSH keys grows. To avoid dealing with the keys in the command line and the ssh_config(5), you can simply add the ssh-key to the … Continue reading

Posted in Linux Administration, Security | Tagged , , | Comments Off on Manage SSH-keys with the SSH-agent

Create a luks encrypted partition on Linux Mint

Encryption is not only for someone who has something to hide. There are simple concerns like a lost or stolen laptop that justify a full disk encryption. There are only a few steps necessary to create a encrypted partition. In … Continue reading

Posted in Encryption, Linux Administration, Security | Tagged , , | Comments Off on Create a luks encrypted partition on Linux Mint

Dimension rrdtool databases with years worth of values

To create an rrd datbase file needs a certain amount of understanding of what you monitor, and for how long the data needs to be kept, and of course, storage space is also a consideration when creating a new rrd … Continue reading

Posted in Database, Monitoring | Tagged , | Comments Off on Dimension rrdtool databases with years worth of values

Configuring vim for dark terminal windows

On CentOS, vim is installed with a default configuration. These defaults might be right for some users but not for everyone. I will describe the two settings I personally find most annoying for my setup. One of the assumtions in the … Continue reading

Posted in Linux Administration | Tagged | Comments Off on Configuring vim for dark terminal windows

Recompress git repository

Git repositories are getting bigger and bigger. To reduce the disk space used by a repository, git provides some housekeeping functionality. Compared to other version control systems, git stores the complete history in each cloned repository if not told otherwise. This can … Continue reading

Posted in Version control system | Tagged | Comments Off on Recompress git repository

Modify file and directory date

Sometimes it is necessary to change a file or even a directory’s timestamp. This sounds easy, but most GUI utilities installed out of the box on OS X as well as on Linux don’t let you change a file’s timestamp. … Continue reading

Posted in Linux Administration, MacOSX | Tagged , | Comments Off on Modify file and directory date

Shrink sparse cqow2 disc image

There might be cases when a VM temporarily used a lot of disk space which is then not needed any more. The sparse disk image format qcow2 will grow as the disk space is used, but it does not automatically shrink. … Continue reading

Posted in Linux Administration, Virtualisation | Tagged , | Comments Off on Shrink sparse cqow2 disc image

Perform a portscan using netcat

To perform a port scan, most of the time we think about a separate program. Sometimes it is not necessary to look that far. On most Linux systems netcat is already installed or can be installed easily from a repository. Continue reading

Posted in Linux Administration, Security | Tagged , , | Comments Off on Perform a portscan using netcat

Restrict SSH access to port forwarding to one specific port

Allowing access to an unprotected service on a server is always a problem. Sometimes the easiest way is to not expose this service to the network but allow access via ssh port-forwarding, but how to limit the SSH account to … Continue reading

Posted in Linux Administration, Security | Tagged , | Comments Off on Restrict SSH access to port forwarding to one specific port

Generate public SSH key from private SSH key

A lost SSH public-key or a web service generates an SSH key but does not provide the public-key part to you. What to do now? There is a solution for this situation. Continue reading

Posted in Linux Administration, Security | Tagged , | Comments Off on Generate public SSH key from private SSH key