Connecting to the Raspberry Pi (and then connecting it again and again)
You might ask why do I need an ethernet cable when there is this wifi dongle right here. Well, in order to configure the wifi you’re going to have to be able to type commands into the cli of the operating system on the SD card.
Just plug the SD card in the Pi, plug the Ethernet cable from the router into the Pi, and the plug the power in. Take an awkward stare at the power connectors.
Even at this early stage you may have plugged in everything a dozen or so times. Only do discover that the monitor doesn’t come on for some reason, or maybe the keyboard won’t respond for some other reason. The goal in mind is to get access to the thing. Once that happens we’re good.
The first piece of info we need is the local IP address of the Pi
Some helpful ideas
In windows start a dos prompt (start>cmd). In the dos prompt type:
OR on a local linux box:
nmap -T5 -n -p 22 –open –min-parallelism 200 192.168.1.0/24
It might take some time to figure it all out. This can be a lot easier if you have access to the router settings. Usually something like 192.168.1.1 or 10.0.0.1 in the address bar of your internet browser, then enter a username/password. This is access to the local router, which isn’t always available. Once inside you can figure out what the IP address of the Raspberry Pi is.
Once you have the local IP address it’s all great. If you are on a windows machine Putty is the tool for you, download it and extract it. It’s not one of those ‘install’ type programs. it’s just a basic tool.
On linux ssh pi@<local-ip-address> is all that is required for now (putty is for windows users)
After gaining access, this will print out the local IP address.
This will help verify the ssh key:
ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
Changing the password should the the first thing you do! (default password is raspberry)
There are lots of tutorials on getting connected in this manner. Once connected be sure to run the config stuff. Set internationalisation options, set timezone, all that stuff. If you don’t set it there could be a serious problem. For example, the British and us keyboards layouts are similar enough to cause huge headaches. Also, if the time zone isn’t correct all sorts of issues might happen, but GMT-0 is preferred for some uses.
Make sure that the ‘boot to desktop’ options is set to boot into a desktop environment. This is key for making a ‘remote’ monitor work correctly.
Oh, and run these before we get in trouble or something…
sudo apt-get update && sudo apt-get upgrade
There is one more issue to attend to before attempting to setup a wifi connection. You’re going to have to at least check that the Pi boots up with a monitor display. If the pi will boot, and you can connect remotely, but there is no display on the monitor then this might help:
sudo nano /boot/config.txt
Un-comment (remove the # symbols) these lines to get the monitor working if it’s not working yet.