For the headless raspberry pi (rp), I tried to connect from my windows PC to Raspberry pi via mobaxterm and ssh. I can connect via ssh (ssh pi@ but I can't display to my local display(ssh -X pi@. I appreciate if someone can guide me which applications/file should I check and configure. I set the ssh_config to allow X11 forwarding. I can't find the sshd_config file in my rp.
1 Answer
In order to forward X display to your machine you need following:
- enable X forwarding on sshd on RPi (/etc/ssh/sshd_config: X11Forwarding yes)
- configure ssh client on your machine to enable X forwarding and point it to X server (for example 127.0.0.1:0)
- install Xserver on your machine (for example Xming) and run it
- log in via ssh to RPi
- start X application on RPi
I recommend Putty as ssh client.When logged in you can check value of $DISPLAY variable:
$echo $DISPLAY
localhost:10.0
Here is some more info if you have problems configuring setup.
-
the information you provide is correct and helpful in general, however the OP indicates that he already has an xserver and an ssh client running (mobaxterm) but seems to have other (configuration related?) problems– epposanCommented Jan 12, 2019 at 6:13
-
@epposan I misssed mobaxterm part. Sorry. I have no experience working with this client - maybe someone else ... I'll leave this answer until someone comes up with something better. Commented Jan 13, 2019 at 12:27
/etc/ssh/sshd_config
?ssh
command looks like this:ssh -Y [email protected]