How to Enable SSH on a Raspberry Pi
Turn on the Raspberry Pi, and open the command line application
Open up the Raspberry Pi Config
$ sudo raspi-config
Save and close the dialog box.
Reboot the Raspberry Pi via the command line
After reboot, look up your inet address
You will need to know your Pi’s password. If you don’t know it (default is “raspberry”), then change it now:
$ sudo -i
$ passwd pi
(type a password)
Check that your Pi’s package manager is up to date
$ sudo apt-get update
Download and run nmap to see your Raspberry Pi’s network address
$ sudo apt-get install nmap
$ nmap -sP (your network range – visible from ifconfig)
Unplug the pi’s ethernet from the router, run nmap. Plug the pi back in, run nmap. The address that disappears and reappears is your Raspberry Pi.
Open the Terminal app on your laptop and ssh to the pi
$ ssh pi@(your inet address)
And you’re in! You are now connected to your Raspberry Pi from your laptop.