Connecting to the Raspberry Pi via SSH
SSH is a protocol to securely connect to a computer. Via SSH you can access the command line, just as if you connected to the computer with a monitor and a keyboard. By default, the Pi has SSH enabled.
Mac and Linux
On Mac and Linux, SSH is already installed and available within the terminal.
To log into the Pi via ssh, type:
Replace <ip-address> with the IP address of the Pi.
Shutting Down and Rebooting Gently
Just unplugging power may leave the file system corrupted. To properly shutdown, use the following commands:
or, to reboot:
Using a Monitor Connected to the Pi
Simply start your Pi with a monitor connected, and it will print out its ip address right before it finishes starting up. You can also get the IP address with the following command:
Also check if your Pi is connected to the internet:
Should return something like:
PING yr.no (184.108.40.206) 56(84) bytes of data.
From 220.127.116.11 icmp_seq=1 Packet filtered
From 18.104.22.168 icmp_seq=3 Packet filtered
From 22.214.171.124 icmp_seq=5 Packet filtered
(Abort the ping by pressing Ctrl and c.
Copying a File to the Raspberry Pi
From the Command Line
If you want to copy a file to the Raspberry Pi form your PC, use the following command:
scp <filename> pi@<ip address of the pi>:~/
scp getmyip.jar email@example.com:~/
This will copy the file into the home directory (/home/pi). During the process, you will be asked for the password for the username pi. If you did not change anything, that password is raspberry.