<div dir="ltr"><div><div><div><div><div>Hi Jacco, Dominik, and other maintainers,<br><br></div>I am an upstream xrdp developer. I also encountered this issue. <br></div><div>If my issue and your issue is same, probably the reason you can't connect is<br>certificate's private key is not accessible byxrdp daemon. Please check your<br>private key permission.<br></div><br></div>In Debian, xrdp daemon is executed by xrdp user privilege. However, certificate's<br>private key is not accessible by xrdp user. <br><br></div><div>Possible solutions are:<br>- Adjust permission/owner of private key file to be accessible from xrdp user<br></div><div>- Add xrdp user to ssl-cert group<br><br>IMHO, the second solution is better.<br><br></div><div>Here's my xrdp process and certificate, private key like.<br></div><br></div>$ ps u $(pgrep ^xrdp$)<br>USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND<br>xrdp      2477  0.0  0.2  24020  2180 ?        S    18:36   0:00 /usr/sbin/xrdp<br><div><div><br>$ ls -l /etc/xrdp<br><div>total 268<br>lrwxrwxrwx 1 root root    36 Mar  7 18:22 cert.pem -> /etc/ssl/certs/ssl-cert-snakeoil.pem<br>lrwxrwxrwx 1 root root    38 Mar  7 18:22 key.pem -> /etc/ssl/private/ssl-cert-snakeoil.key<br><br># ls -l /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/private/ssl-cert-snakeoil.key<br></div>-rw-r--r-- 1 root root      997  3月  7 18:09 /etc/ssl/certs/ssl-cert-snakeoil.pem<br>-rw-r----- 1 root ssl-cert 1704  3月  7 18:09 /etc/ssl/private/ssl-cert-snakeoil.key <- HERE'S A PROBLEM<br><br><div><div><div><div><div>On Wed, 01 Mar 2017 01:56:55 +0100 Jacco Kwaaitaal <<a href="mailto:j.j.b.kwaaitaal@mindfruit.nl">j.j.b.kwaaitaal@mindfruit.nl</a>> wrote:<br>> Package: xrdp<br>> Version: 0.9.1-7<br>> Severity: normal<br>> <br>> Dear Maintainer,<br>> <br>> If in xrdp.ini the option security_layer=tls is configured, a client is not<br>> able to connect. <br>> <br>> E.g. on the client-side using rdesktop the following error is displayed:<br>> 140464326739656:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:s3_pkt.c:348:<br>> Failed to connect, SSL required by server.<br>> <br>> The xrdp.log shows:<br>> [20170301-01:31:33] [INFO ] A connection received from: -X- port 53758<br>> [20170301-01:31:33] [DEBUG] Closed socket 12 (AF_INET6 -X- port 3389)<br>> [20170301-01:31:33] [DEBUG] Closed socket 11 (AF_INET6 -X- port 3389)<br>> [20170301-01:31:33] [INFO ] Using default X.509 certificate: /etc/xrdp/cert.pem<br>> [20170301-01:31:33] [INFO ] Using default X.509 key file: /etc/xrdp/key.pem<br>> [20170301-01:31:33] [DEBUG] Security layer: requested 1, selected 1<br>> [20170301-01:31:33] [DEBUG] Closed socket 12 (AF_INET6 -X- port 3389)<br>> [20170301-01:31:33] [ERROR] Listening socket is in wrong state, terminating listener<br>> <br>> I have tried the option disableSSLv3=true, but that doesn't make any difference.<br>> Other clients (remmina, xfreerdp, windows remote desktop client) won't work either.<br>> The cert/key-files have umask 600 owned by root.<br>> I have tried to explicitly choose non-SSLv3 ciphers with the option<br>> tls_ciphers=HIGH:-SSLv3, but that didn't work.<br>> <br>> It should be possible to reproduce this with a standard Stretch installation.<br>> <br>> Best regards,<br>> Jacco<br>> <br>> -- System Information:<br>> Debian Release: 9.0<br>>   APT prefers stable-updates<br>>   APT policy: (500, 'stable-updates'), (500, 'testing'), (500, 'stable')<br>> Architecture: amd64 (x86_64)<br>> <br>> Kernel: Linux 4.9.0-1-amd64 (SMP w/6 CPU cores)<br>> Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (charmap=UTF-8)<br>> Shell: /bin/sh linked to /bin/dash<br>> Init: systemd (via /run/systemd/system)<br>> <br>> Versions of packages xrdp depends on:<br>> ii  adduser              3.115<br>> ii  init-system-helpers  1.47<br>> ii  libc6                2.24-9<br>> ii  libfuse2             2.9.7-1<br>> ii  libjpeg62-turbo      1:1.5.1-2<br>> ii  libopus0             1.2~alpha2-1<br>> ii  libpam0g             1.1.8-3.5<br>> ii  libssl1.1            1.1.0e-1<br>> ii  libx11-6             2:1.6.4-3<br>> ii  libxfixes3           1:5.0.3-1<br>> ii  libxrandr2           2:1.5.1-1<br>> ii  lsb-base             9.20161125<br>> ii  ssl-cert             1.0.38<br>> <br></div></div></div></div></div></div></div></div>