How to connect via SSH and VNC to proprio Raspberry Pi

3 minutes of reading
Guide purposes
  • Connect via proSSH tocol or VNC al service proprio Raspberry Pi configured with Raspbian operating system
  • Difficulty level: bass
Concepts dealt with:
  • Software use
Software components used:
  • various
Prerequisites
  • Network (Wifi and / or Lan)
  • SSH and VNC services active on Raspberry Pi with Raspbian operating system (see paragraph “First ignition”Of the installation guide Raspberry Pi)
Physical devices used:
  • Un Raspberry Pi configured and working
  • A computer (Apple Mac, Windows or Linux) configured and working
Notes and disclaimer
  • qualsiasi modifica all'impianto elettrico dev'essere progettata ed effettuata da personale qualificato;
  • any changes implemented in probefore is a propersonal responsibility as well as a profirst risk and danger (the contents of the present page are purely educational);
  • any changes implemented in proprior to a device it voids the guarantee, quality approvals and certifications.

Abstract

After installed and configured on proprio Raspberry Pi, to use it is useful to discover how to connect to it. Although it can be used like a real e proyour computer (therefore through monitor, keyboard, mouse), given its characteristics (low consumption, miniaturization) Raspberry Pi it is indeed ideal for "server" use, or connected to the network, always on and controlled "remotely" from other devices which computers (Apple, Windows, Linux) and / or terminals such as tablets and even smartphones.

This guide shows how, after the first installation and configuration, connect interactively with this device.

SSH

SSH is a protocol that allows to establish a remote session encrypted via the command line interface with another one host of a computer network, in our case the Raspberry Pi. This is the most common methodology appapplied in the administration phase of the Raspberry Pi. When referring to "executing a command" on that device, reference is made to such a connection.

USING WINDOWS

In case our computer uses the operating system Windows, to connect via SSH to ours Raspberry Pi you need to download a specific free software called "PuTTY"

Download PuTTY to the site greenend.org.uk, looking for the link of putty.exe at the entry For Windows on Intel x86.

PuTTY does not require any installation. Once downloaded, it is in fact sufficient to launch it.
Appa screen will appear as follows:

PuTTY for Windows - config

Add now to the item Host Name the IP of Raspberry Pi.

Please note: the IP of Raspberry Pi can be discovered through the proindicated in our guide to the item "DISCOVER THE IP ASSIGNED TO RASPBERRY"

Click now on "Open".

If nothing happens or you get an error like:

Network error: Connection timed out

means the IP entered it's not right or that one of the two devices, or both (computer and Raspberry), they are not on the same network. Check it all out.

In case of connection be successful, first time appa screen will appear as follows:

PuTTY keys warning

Click on "Yes"

At this point the textual interface will ask which user to use to connect.
To write "pi”And press enter.
At this point enter the user's password "pi”And press enter.

Nb The default password for the user "pi"On Raspbian is"r". We recommend that you change it immediately after entering.

If the password will be accepted, you will have access to it procommand mpt that would be obtained by physically connecting to Raspberry Pi (outside the graphical interface), that is:

pi@raspberrypi ~ $

The screen appwill appear as follows:

PuTTY after login

It is now possible to execute remote commands on the Raspberry.

To terminate the connection, simply type:

exit

followed by sending.

USING APPLE macOS OR LINUX

Within Appthe / Linux everything is easier, as these two environments they are already equipped with a terminal through which to connect via SSH to Raspberry, so there is no need to download additional software.

By running appanointedapplation "Terminal" (just look for it among the programs available), it will be sufficient to execute the command

ssh nomeutente@ip

where is it "username" is the name of the user to use on the target system while "ip"Is the IP of the target system itself.

Please note: the IP of Raspberry Pi can be discovered through the proindicated in our guide to the item "DISCOVER THE IP ASSIGNED TO RASPBERRY"

Example:

ssh pi@192.168.1.10

At the first connection the system will ask if you want to save the pre-shared cryptographic keys or not. The request can easily be accepted by writing to terminal "yes" and then pressing enter.

To terminate the connection, simply type:

exit

followed by sending.

VNC

VNC is a system that allows us, unlike SSH, to connect to the graphical environment (desktop) offered by Raspberry Pi how to find yourself physically connected to a monitor connected to it.

To connect via VNC to ours Raspberry Pi you need to download a specific free software called "RealVNC". This free software is available for various systems other than the discounted ones Windows, Apple macOS and Linux: in fact, versions are available for mobile devices (therefore Android and AppiOS) as well as other less popular systems, such as Sun Solaris and HP-UX.

"RealVNC" can be downloaded for free from the realvnc.com website.

Once the version for the system of interest has been downloaded, run VNC and enter, under the heading "VNC Server" the IP of the Raspberry to which to connect:

VNC

Then click on "Connect".

Please note: the IP of Raspberry Pi can be discovered through the proindicated in our guide to the item "DISCOVER THE IP ASSIGNED TO RASPBERRY"

Salt'applished here should give error, or the indicated IP is incorrect or one of the two devices is not on the same network as the other. Check it all out.

Once connected, you will need to enter a username and password (of the Raspberry you are connecting to) to gain access to the graphical environment.


Please comment below