简体   繁体   中英

access raspberry desktop over internet

I am currently trying to access my raspberry pi over the internet. I hope I can access its desktop in library when my pi is at home.

for now, I have managed to access my pi through ssh over the internet, but I don't know how to access the GUI interface. I downloaded RealVNC Viewer on my PC and use sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer to make VNC available on my pi. the VNC viewer is now working well when I am at home that my pc and pi are in the same Wi-Fi, but it's not working when I'm in library. It gives: Connection refused by the computer.

I know the IP address of my pi and it's working when I use ssh option, can anyone shed some light on my problem? By the way, I have changed my port to, say, 30 in my sshd config file for security reason. Would it make any difference when I use vnc?

You have at least two options. One is to have an X server in your client computer (in the library): Xming is good. Then use "ssh -X" from the library computer. The "-X" option does the magic to tunnel the X protocol transparently from the pi to the PC.

The other option is to use vnc, but if your pi is behind a router, you have to "open a port" on the router and forward that port toward your pi. The procedure for doing this is very different from router to router.

There are also mechanisms available, in linux/unix, to limit access from outside the internal net (/etc/hosts.***), you should check.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM