Enable SSH in Raspbian

You can use SSH to access the command line of your Raspberry Pi. SSH (Secure Shell) is a network protocol that enables you to log into the Raspberry Pi device over the network and execute commands. All data transmitted over the network (including usernames and passwords) is encrypted and secure from eavesdropping.

SSH is a client-server protocol; you install an SSH client program on your Windows machine and enable an SSH server on the Raspberry Pi. The SSH server should be enabled by default in Raspbian. To make sure that this is the case, open the raspi-config tool (by entering the sudo raspi-config command in the terminal) and navigate to Advanced Options > SSH. Make sure that the SSH server is enabled:

raspbian ssh server enabled

On the client computer you can use a program like Putty as the SSH client. Download Putty and start it. Then enter the IP address of your Raspberry Pi device and make sure that SSH is selected as the connection type:

access raspberry pi putty

The first time you are connecting to a new device, you will get the warning that the server’s key is not cached in the registry. Click Yes to add the key to the registry and carry on with the connection:

putty security alert

Log in with your username and password (pi and raspberry, by default):

putty log in

And that’s it! Now you can execute commands and manage your Raspberry Pi remotely:

putty raspberry pi

Geek University 2021