Kali linux: xrdp 및 mstsc를 사용하여 원격 시스템에서 연결할 수 없습니다.

Kali linux: xrdp 및 mstsc를 사용하여 원격 시스템에서 연결할 수 없습니다.

나 좀 문제가 있어

xrdp 및 mstsc를 사용하여 원격 시스템(예: Windows7)에서 kali에 연결하고 싶습니다.

그래서 xrdp 서비스를 설치하고 실행해 보았는데, 다음에는 Windows에서 연결을 시도했지만 작동하지 않고 오류 메시지도 나오지 않았습니다.

그래서 /var/log/xrdp.log를 확인하고 몇 가지 단서를 얻었습니다.

그것은 말한다:

[20160725-14:03:37] [INFO ] A connection received from: 0.0.0.0 port 9036
[20160725-14:03:37] [INFO ] An established connection closed to endpoint: 0.0.0.0:9036 - socket: 11
[20160725-14:03:37] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 10
[20160725-14:03:37] [CORE ] WARNING: Invalid x.509 certificate path defined, default path will be used: /etc/xrdp/cert.pem
[20160725-14:03:37] [WARN ] Invalid X.509 certificate path defined, default path will be used: /etc/xrdp/key.pem
[20160725-14:03:37] [DEBUG] xrdp_000014b6_wm_login_mode_event_00000001
[20160725-14:03:37] [WARN ] local keymap file for 0xe0010412 found and doesn't match built in keymap, using local keymap file
[20160725-14:03:51] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 16
[20160725-14:03:55] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 16
[20160725-14:03:59] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 16
[20160725-14:04:03] [ERROR] Failure to connect to sesman: 127.0.0.1 port: 3350
[20160725-14:04:03] [INFO ] An established connection closed to endpoint: NULL:NULL - socket: 16
[20160725-14:04:03] [DEBUG] return value from xrdp_mm_connect 1
[20160725-14:24:56] [INFO ] An established connection closed to endpoint: 0.0.0.0:9036 - socket: 11
[20160725-14:24:56] [DEBUG] xrdp_mm_module_cleanup
[20160725-14:24:56] [ERROR] Listening socket is in wrong state we terminate listener

"정의된 X.509 인증서 경로가 유효하지 않습니다"라는 키워드로 검색하여 몇 가지 해결 방법을 얻었습니다.

chcon: 태그가 지정되지 않은 파일 '/usr/sbin/xrdp'에 부분 컨텍스트를 적용할 수 없습니다.

나는 이것을 시도했지만 실패했습니다.

root@kali:~# chcon -u system_u -r object_r --type=bin_t /usr/sbin/xrdp
chcon: can't apply partial context to unlabeled file '/usr/sbin/xrdp'

이 문제를 어떻게 해결할 수 있나요?

다음에 추가

root@kali:~# sestatus
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             default
Current mode:                   permissive
Mode from config file:          permissive
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      30

답변1

단서는 다음과 같습니다 xrdp.log.

[20160725-14:04:03] [ERROR] Failure to connect to sesman: 127.0.0.1 port: 3350

다음 방법 중 하나를 사용하여 xrdp-sesman 서비스를 시작해 보십시오.

$ service xrdp-sesman start

또는

$ systemctl start xrdp-sesman

관련 정보