Setting up ssh with a subdomain for a raspberry pi

Setting up ssh with a subdomain for a raspberry pi

I’m slowly working towards setting up a raspberry pi as a web server. Before I can do that though, I have to get ssh working on the pi. Here are the steps I took to get it working! Note, I am using Raspberry Pi 4.

Using the raspberry pi GUI

  1. Menu > Preferences > Raspberry Pi Configuration > Interfaces Tab > Switch SSH to Enable
  2. Restart Raspberry Pi
  3. Menu > Preferences > Raspberry Pi Configuration > System Tab > Change Password from the default raspberry password. It won’t let you ssh in otherwise. The default user is pi.
  4. Open the terminal on the pi and use the ifconfig command to get the IP address of the pi.

From a different computer

From a different machine, open the terminal and ssh in using ssh pi@<ip_address>. When prompted, enter the updated password. It should work!

From Google Domains GUI

Using google domains, create A NAME dns record with the subdomain of pi (or whatever you want) and the IP address of your raspberry pi. I set the TTL to 5m, DNS stuff always seams to update pretty fast for me these days (I’m doing pretty simple stuff usually). You should now be able to ssh in using something like ssh pi@pi.<domain>.com.

References
brandon

About Brandon C Sammons

Brandon is a versatile and passionate engineer that uses design thinking and web technologies for creative problem-solving. He is currently working as the Director of Software at SXSW and teaching Web Design at FIDM.