Monthly Archives: March 2018

CloudFlare does not allow port 22 (usual SSH port) on domain

When you try to connect via ssh on a domain for which you are using CloudFlare as a HTTP proxy, you will get the following error:

$ ssh [email protected]
 ssh_exchange_identification: Connection closed by remote host

You have a few options to resolve for this issue:

  1. Either connect directly to the IP of the machine.
  2. Or, setup a CNAME record with no HTTP proxy for the SSH (so that you do not need to remember the IP).
    This solution does not offer any additional benefits than connecting directly to the IP of the server.
    To do that, you need to visit the configure DNS page for your site: e.g.,
    then create the CNAME named ssh, use as target your domain (e.g. and disable HTTP proxy by clicking on the orange cloud and making it gray before pressing the Add Record button.

    Then, you will be able to connect via ssh [email protected].
  3. Last solution but not least is configuring your server to listen for SSH on one of the ports of CloudFlare that are open.
    When this post was written, the following ports were available/open for any site in CloudFlare:
    For requests made via HTTP:


    For requests made via HTTPS:


    At the time, we were using an Ubuntu GNU/Linux server, to instruct Ubuntu SSHD to listen to multiple ports we edited the file /etc/ssh/sshd_config and right after the lines:

    # What ports, IPs and protocols we listen for
    Port 22

    we added another line with the new port we wanted to use:

    # What ports, IPs and protocols we listen for
    Port 22
    Port 2053

    After restarting the service
    service ssh restart;
    we were able to connect to our page as follows:
    ssh -p 2053 [email protected];


Cannot verify domain with Yandex when domain is behind CloudFlare

Recently we were trying to verify the ownership of a domain through yandex. We tried the CNAME approach which would be more universal and so we added a new CNAME record in the DNS configuration in CloudFlare.

The record had the following configuration:

  • Type: CNAME
  • Name: yamail-dd63c3831dbd
  • Value:
  • TTL: Automatic
  • Status: DNS and HTTP proxy (CDN)

We tried several times the verify domain button in but it kept on failing saying that the CNAME record was not found. Only after we disabled the DNS and HTTP proxy (CDN) did it work.

So in the end, the properly working record was as follows:

  • Type: CNAME
  • Name: yamail-dd63c3831dbd
  • Value:
  • TTL: Automatic
  • Status: DNS Only

JetPack: Cannot Verify Site Ownership using pinterest

Recently, we tried to verify the ownership of a site running WordPress with JetPack in Pinterest.

As the instructions say, we logged in to Pinterest and visited the settings page to Claim Website paragraph.

Using the meta tag solution we received a code similar to the one below:

<meta name="p:domain_verify" content="8525e3384b3545fb80b9e21f0910de21"/>

When we tried to add the code in the JetPack site verification page ( we got the following error:
Error updating settings. Invalid parameter(s): pinterest (Status 400).

To resolve the issue, we just added a space character right before the end of the tag /> and our code became:

<meta name="p:domain_verify" content="8525e3384b3545fb80b9e21f0910de21" />

Trying again, it worked properly!

Compiling DJI Onboard-SDK: error: ‘fd_set’ does not name a type

While compiling the DJI Onboard SDK on a Fedora GNU/Linux we got the following error:

[ 41%] Building CXX object osdk-core/CMakeFiles/djiosdk-core.dir/platform/linux/src/linux_serial_device.cpp.o
In file included from Onboard-SDK/osdk-core/platform/linux/src/linux_serial_device.cpp:33:0:
Onboard-SDK/osdk-core/platform/linux/inc/linux_serial_device.hpp:97:3: error: ‘fd_set’ does not name a type; did you mean ‘tzset’?
 fd_set m_serial_fd_set;
In file included from /usr/include/sys/types.h:197:0,
 from /usr/include/stdlib.h:279,
 from /usr/include/c++/7/cstdlib:75,
 from /usr/include/c++/7/bits/stl_algo.h:59,
 from /usr/include/c++/7/algorithm:62,
 from Onboard-SDK/osdk-core/platform/linux/src/linux_serial_device.cpp:34:
Onboard-SDK/osdk-core/platform/linux/src/linux_serial_device.cpp: In member function ‘int DJI::OSDK::LinuxSerialDevice::_serialStart(const char*, int)’:
Onboard-SDK/osdk-core/platform/linux/src/linux_serial_device.cpp:330:14: error: ‘m_serial_fd_set’ was not declared in this scope
Onboard-SDK/osdk-core/platform/linux/src/linux_serial_device.cpp:330:14: note: suggested alternative: ‘m_serial_fd’
Onboard-SDK/osdk-core/platform/linux/src/linux_serial_device.cpp:331:26: error: ‘m_serial_fd_set’ was not declared in this scope
 FD_SET(m_serial_fd, &m_serial_fd_set);
Onboard-SDK/osdk-core/platform/linux/src/linux_serial_device.cpp:331:26: note: suggested alternative: ‘m_serial_fd’
make[2]: *** [osdk-core/CMakeFiles/djiosdk-core.dir/build.make:735: osdk-core/CMakeFiles/djiosdk-core.dir/platform/linux/src/linux_serial_device.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:86: osdk-core/CMakeFiles/djiosdk-core.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

To resolve this, we added to the file Onboard-SDK/osdk-core/platform/linux/inc/linux_serial_device.hpp the following include directive right after line 37 (which contained #define LINUXSERIALDEVICE_H):

#include <sys/select.h>

Then, we issued make again which terminated successfully.


Compilation Commands:

git clone;

cd Onboard-SDK;

mkdir build;

cd build;

cmake ..;

#Modify the file Onboard-SDK/osdk-core/platform/linux/inc/linux_serial_device.hpp and add #include <sys/select.h> at the top

make all;

# Something

# Make profit

Lubuntu: “Do Nothing” when I close the laptop’s lid

A few days ago we setup a server on a laptop with lubuntu. We wanted to make sure that once the screen lid is off, the PC would not shut down (or hibernate or sleep) and it would continue to accept requests.

We tried to configure the PC through the system settings that are available with the GUI but we could not get it to work right. Anyhow, what we did in the end and worked was the following:

In the file /etc/systemd/logind.conf we set the variable HandleLidSwitch to ignore. So after the change, the following line was in logind.conf:


If the above line is commented out (i.e. starts with the character #, be sure to uncomment it by removing the # character).
After that, we had to restart the systemd-logind service as follows:

service systemd-logind restart;

Finally, to test we closed the lid and the server was operating as expected.


If you have a power manager such as xfce4-power-manager-settings, it is a good practice to make sure it is configure properly first before doing the change above. (e.g. Set Lock screen or Switch off display in When laptop lid is closed option).

If you start xfce4-power-manager after you do the change above, you might have to restart the service again as the solution seems to stop.

Google Hash Code 2018 – Results of the Hubs we Organized

Online Qualification Round

Position in Merged Ranking Position in Local Ranking Team Hub Score
1 1 Coffee Transistors Greece / NTUA ECE 49196020
2 2 Entropy Sources Greece / NTUA ECE 49051760
3 3 Veni Vidi Vsync Greece / NTUA ECE 46694239
4 1 Happy Trolls Cyprus / Cyprus University of Technology 45615170
5 4 lambdatron Greece / NTUA ECE 41908173
6 5 cuckooHashers Greece / NTUA ECE 41891579
7 2 Halloumium Cyprus / Cyprus University of Technology 41451768
8 1 Cheesy Coders Cyprus / University of Cyprus 39960712
9 6 NTUAwannaCODE Greece / NTUA ECE 39264060
10 2 MIP-MAP Cyprus / University of Cyprus 39013961
11 3 iPemberMen Cyprus / Cyprus University of Technology 37970348
12 4 UndefinedIsNotAFunction Cyprus / Cyprus University of Technology 34840916
13 7 111 Greece / NTUA ECE 33623110
14 8 Bits Plz Greece / NTUA ECE 33048131
15 9 #include<wraio_prama.h> Greece / NTUA ECE 31335747
16 3 #Patates Antinaxtes – XM Cyprus / University of Cyprus 30789367
17 10 Bill^2 Greece / NTUA ECE 30224719
18 11 λambda Greece / NTUA ECE 30209240
19 12 ntua67P Greece / NTUA ECE 18527523
20 13 Milwaukee Bugs Greece / NTUA ECE 14469721
21 14 DeathRow Greece / NTUA ECE 14167166
22 4 Lab_Rats Cyprus / University of Cyprus 12074631
23 15 ReadX Greece / NTUA ECE 11868571
24 16 XM Athens #1 Greece / NTUA ECE 10122968
25 17 Ojama Geeks Greece / NTUA ECE 8480600
26 5 FourCats Cyprus / Cyprus University of Technology 8050139
27 18 Tea Debuggers Greece / NTUA ECE 6646478
28 19 gargaNTUAns Greece / NTUA ECE 1942966
29 20 Rocket 🚀 Greece / NTUA ECE 1767702
30 21 Positive Feedback Greece / NTUA ECE 586021
31 5 PC for ProCrastination Cyprus / University of Cyprus 458402
32 22 I hmmy. U ece? Greece / NTUA ECE 174687
33 6 CodeLovers Cyprus / University of Cyprus 10
34 7 miou-miou Cyprus / University of Cyprus 10
35 23 Googlee Greece / NTUA ECE 10
36 24 Coding freaks Greece / NTUA ECE 10