I face a problem that I can ping to correct IP address, it have no loss. And also I use nmap ping the pi address, and I get it correctly. Then I using VNC viewer to try access to pi, but it always show up "The connection was refused by the host computer"
Did u all have any idea ?
The remote computer's antivirus software or firewall is blocking your connection attempt. On the remote computer, ensure antivirus software lists VNC Server as an exception, and the firewall is configured to allow access on VNC Server's listening port (5900 by default).
Open a terminal window and run the command sudo apt-get update, then sudo apt-get install realvnc-vnc-server. This will make sure you're running the latest version. Then, in the graphical desktop, go to Menu > Preferences > Raspberry Pi Configuration > Interfaces. You will come across VNC in there.
Your problem indicates that your Raspberry Pi was reached by the connection attempt, but that no service was running on the relevant port and hence the connection was refused. I think, this is because the VNC service is not running on your Raspberry Pi.
Update 1
Raspbian now comes with the server by default thanks to a partnership with RealVNC, it just needs to be enabled.
Original
You must enable VNC Server on your Raspberry Pi using terminal
sudo apt-get update
sudo apt-get install realvnc-vnc-server
or you can also enable VNC Server on the command line using the sudo raspi-config
command.
Advanced Options->VNC:Yes
Now you can connect to the VNC Server using a application such as VNC Viewer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With