SSH RaspBerry Pi and PC using RJ45 Cable
- Raspberry Pi model B. We need an ethernet port, and the model A doesn't have one.
- A computer. Linux, Mac and Windows are all fine.
- High speed SD card. This is were we will install the Operating system for the Pi. Try to find a proper SD card for the job. It should be at least with 4 GB capacity. Class 4 to 10 have been working allright for me so far. It is better to choose one with a higher class number.
- SD card port or external reader. You need to be able to read / write on the SD card with your computer.
- Power adapter for Raspberry Pi. 5V, 1–2A, most phone chargers with a micro USB type B plug are fine.
- Network cable. Cat 6 or 5 ethernet cable, basically cables you have at home should be fine.
- Ethernet port or USB adapter. You need to be able to connect your laptop to the raspberry Pi via ethernet.
We will be using SSH a lot to communicate with the Pi form our laptop. SSH (Secure SHell) is a secure network protocol that allows to control other computers over network. If you are using Windows, download Putty for using it as your SSH client. MobaXterm is also a good choice.
We will need to upload and download files to and from the Raspberry Pi. For this, we will use SCP (Secure CoPy or Secure Copy Protocol) which is built on top of the SSH protocol and allows secure transfer of files. Download FileZilla. It works on Mac, Linux and Windows. You might consider WinSCP as your weapon of choice if you are using Windows.
Program to format the SD card
Program to burn disk images
To be able to write the Raspbian image to your SD card, download the Win32 Disk Imager.
Raspbian is the operating system that we are going to install on the Raspberry Pi. You can download the most recent version here and unarchive it. The archive contains only one file - a full disk image of the Raspbian system.
- Formatting the SD card using SDFormatter- Burning the Raspbian image using Win32 Disk Imager
4.Launching the Pi
In order to connect for the first time, we need to give the Pi and our laptop static IP addresses that are in the same network.To do that, insert the SD card in the reader, and with the file browser of your operating system browse the contents of the card. There should be a file named
This file contains options that are passed to the Linux kernel as it boots up. Open the file in your favorite text editor. We need to add the following at the end of the existing content:
Save and close the file. Eject the SD card before removal. We will be able to access the Pi through network with the IP address
Now let's assign our laptop a static IP.
Go to Network Settings and edit the TCP/IP part, set the IP address to "manual".Set the IP address to
192.168.137.1, netmask to
255.255.255.0and the gateway (router) address to
5.Booting up - the first time
Connect your Raspberry Pi to the computer with an ethernet cable, eject the SD card from your computer, and put it in the Pi, then plug-in the Pi's power adapter.First, let's test that we can reach the Pi with the IP address we gave it.
For this, we will use the commandIt means that for some reason, the Pi cannot be reached. In that case, double check your network parameters. You might also have to wait as the Pi takes about 20 seconds to boot.
ping 192.168.1.200in the Command Prompt. To open the Command Prompt, go to Start and type cmd in the input text field and press enter. A window with black background and white text will open. There should be response:
64 bytes from 192.168.1.200: icmp_seq=3 ttl=64 time=52.941 ms
If the Raspberry Pi is not reachable:
Request timeout for icmp_seq 0
Use MobaXterm or Putty to connect to the Raspberry Pi by using IP addressThe SSH connection just opens a remote shell on the Raspberry Pi. Basically, you can run commands, just like in your own computer's terminal, but they are executed on the Raspberry Pi.