Skip to content

Latest commit

 

History

History
94 lines (61 loc) · 3.96 KB

sshpi.md

File metadata and controls

94 lines (61 loc) · 3.96 KB

SSH Tutorial

Objectives

  • Set up your SSH key
  • Log into your Pi with Root
  • Set up Tor

Create your SSH key

Follow these steps to create your SSH key:

Log in with the Pi user

Once you start up your Raspberry Pi and find its local IP address, you can connect to it from your computer using your Terminal. Windows users should use Git Bash.

Run the following:
ssh pi@[local IP address]

When you connect through SSH for the first time, you will be prompted to accept the RSA key fingerprint, type “yes” to continue. The Pi user's default password is "raspberry". You should see something like this:

$ ssh [email protected]
The authenticity of host '10.0.0.32 (10.0.0.32)' can't be established.
ECDSA key fingerprint is SHA256:BzmwLK14V/EVa0m/0/SYFtGM/60zm7mFe5vVCWAxqe4.
Are you sure you want to continue connecting (yes/no)? yes 
Warning: Permanently added '10.0.0.32' (ECDSA) to the list of known hosts.
Enter passphrase for key '/Users/username/.ssh/id_rsa': 
Linux treehouses 4.19.58-v7+ #1245 SMP Fri Jul 12 17:25:51 BST 2019 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Aug 15 03:24:59 2019 from 10.0.0.36

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

pi@treehouses:~ $ 

Add ssh key to the Raspberry Pi

To add your SSH key to your Raspberry Pi, run: treehouses sshkey add "your SSH key" (copy-paste your SSH key in between the quotes).

Log in by Root

To log into root, you can run sudo -s while logged into the Pi user, or SSH directly into it by running ssh root@[local IP address] instead of ssh pi@[local IP address].

Rename Pi by Github Name

To rename your Raspberry Pi, run treehouses rename "username" and replace username with your Github username.

Tor

Tor is a computer network run by volunteers worldwide. Each volunteer runs what is called a relay, which is just a computer that runs software allowing users to connect to the Internet via the Tor network.

Before hitting the open Internet, the Tor Browser will connect to several different relays, wiping its tracks each step of the way, making it difficult to figure out where, and who, you really are.

First start by watching this {video](https://www.youtube.com/watch?v=6czcc1gZ7Ak) on the Tor browser Get Tor

The Systems Team utilizes this tool to provide a further layer of security when interacting with the Raspberry Pis deployed in the field.

Get Tor

macOS

You should already have Homebrew installed. You can check if it's already installed by running brew -v in your terminal. If you haven't yet installed it, run the following:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install wget

Then, install Tor and Tor Browser:

brew install tor
brew cask install tor-browser

Windows & Linux

Install Tor

Turn on Tor

To activate Tor, SSH into your Raspberry Pi with root, and run treehouses tor add 22, treehouses tor add 80, and treehouses tor notice on. To view the Tor address of your Pi, run treehouses tor, then copy-paste this address into your Tor Browser, to make sure it works; you should see a configuration page for Planet Learning, one of our other services.

Return to First Steps