Dynamic DNS for your Pi (SSH using user@yourpi.ddns.net instead on an IP!)

Introduction

Have you ever wished that you didn't have to VPN into your home network and memorize you Pi's IP address just to use it? Well with Dynamic DNS you don't have to! By enabled DDNS you can choose your own host name and access your Pi from just about anywhere (sorry for our readers North Korea and China).

Caution: This article will teach you how to use DDNS using free service which do expire after 60 to 90 days. The terms and conditions of use for these sites do change so if you notice anything different please let us know!

What You'll Need

  • Raspberry Pi (Model 2 or later)
  • SD Card (8GB minimum)
  • Power Supply (for your Raspberry Pi)
  • HDMI Cable
  • Ethernet Cable (CAT5 or CAT6 cable are fastest!)
  • Keyboard and mouse (for initial setup)
  • Access to the Internet (If you are reading this article we can assume you have it!)
  • An open mind for molding

Step One: Boot the Raspberry Pi

Note: This article assume you already have a working copy of Raspbian.
  1. Plug in your keyboard, mouse, and Ethernet cables
  2. Turn on your Pi
  3. Log in using your preset username and password.

Step Two: Configure the Raspberry Pi for SSH

  1. Run the following commands to upgrade your Pi to the latest software
  • Sudo apt-get update
  • Sudo apt-get -y upgrade
  1. Next we will open the raspian configurations with the following command
  • Sudo raspi-config
  1. Scroll down to interfacing options and enable SSH.
  2. Reboot your Pi and SSH should be enabled
  • To check if it is enable you can use the following command from another computer: ssh youruser@youripaddress
  • This should only work on your local network as of right now

Step Three: Configure Dynamic DNS

  1. Setup an account with noip.net
  • In order to create a dynamic DNS you will need to create an account at noip.net and give it various information on setup. The information will include your current ip address, user name, password, and a few other standard informtions. Upon finishing setup of yoru account, your dynamic DNS server should be something like examplepi.ddns.net.
  1. Install ddclient
  • Sudo apt-get install ddclient
  • The dd-client should ask for the exact same information that you entered into noip.net

Step Four: SSH using DDNS

  1. Simply enter in your ddns hostname instead of your ip address to ssh in!










Comments