Tunnel MySQL through SSH

Recently I had the challenge, that the MySQL database of one of the Magento shops I maintain wasn’t accessible directly through the Net. The access was restricted to the Webserver only. So I had to tunnel MySQL through SSH. And that worked like that: edit the ssh config (~/.ssh/config) on the remote Webserver

create  […]

Mount a ssh filesystem under Linux or How I mounted my webspace into my root server

Today I had to mount a ssh filesystem under Linux. The reason was, that I had the perception that I would be a very cool idea, to use my old webspace package from all-inkl.com, that I only kept because of the 10 included domains, as a backup storage for my root server. The plan was […]

Restrict root ssh access to a single IP under Raspbian / Debian / Ubuntu

Today I configured a new backup solution that required me to restrict root ssh access to a single IP for the root user. I got tis to work by going the following steps (on Raspbian GNU/Linux 9): login via ssh on the maschine to access via root modify the /etc/ssh/sshd_config like that

add the following […]

Rename multiple files on shell

To rename multiple files in the current folder, you can use the following command:

In this case, I had a bunch of files that I had to rename temporarily. They all started with Scheldon_ and had the fileending .xml. The snippets above first rename these files to Scheldon_SOMEWHAT.xml_bkp and then back to the original name Scheldon_SOMEWHAT.xml.

Export or extract a certificate to or from PFX

Sometimes you have to deliver or you even get your server certificate files in the pfx file format (personal information exchange, see https://msdn.microsoft.com/en-us/library/windows/hardware/ff549703(v=vs.85).aspx), that is commonly used in Windows based environments. The following paragraphs show, how to export or extract a certificate to or from PFX. Export cert to PFX In order to export the Certificate, Private Key and any […]

Resolve problems with authorized_keys permissions

Sometimes I had problems to connect to a server via public key authentication. In most cases I could solve them by setting up the right permissions for the file and path of the authorized_keys file. This can be done as shown below:

Download password protected file over shell

Therefore we use wget:

If you let -O param out the output will be stored under its original name.

Plesk Parallels add authorized keys authentication

In Parallels Plesk 9.x, 10.x and 11.x for Linux (in this case CentOS 6.6) there is a bug. You can not authenticate via ssh key or add one f.e. with:

Thats why you have to do this: Edit ssh deamon configuration:

Add the following line:

Restart the SSH Deamon:

Now the […]