How to disable ssh on Raspberry Pi when xrdp connection established #2286
-
Hi, I have install xrdp on Raspberry Pi board, Ubuntu 18.04 installed on it . I want to disable ssh service on Raspberry Pi when I started RDP from other Window's machine. & Resume ssh service after RDP session closed. Is there any flag/file/configurations when xrdp initialize session, so that I can poll to disable the ssh service on RPi? |
Beta Was this translation helpful? Give feedback.
Answered by
matt335672
Jun 10, 2022
Replies: 1 comment 1 reply
-
I can think of a couple of ways you could poll for this.
Are any of those any good? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
bhaijiyunus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I can think of a couple of ways you could poll for this.
loginctl
which should tell you when a session is active.xrdp-sesman
process.xrdp
process. This is different from 2) in that you will have twoxrdp-sesman
processes for the whole lifetime of the session, but only twoxrdp
processes when you are connected to the session. It depends on exactly what you want.ss -o state established '( sport = :3389 )'
for a live connection to xrdp.Are any of those any good?