SSH for Raspberry Pi

2025-02-02

Introduction

I recently purchased a Cana Kit that came with a Raspberry Pi 5. I plan to host this blog on the Pi and use it for some other things like a Pihole server and a Pi VPN. In this post, I’ll explain how I set up my Raspberry Pi 5 to securely SSH into it from the same network. In subsequent posts, I’ll explain how to do this from outside the network by using a VPN. While Raspberry Pi Connect exists now, I generally prefer doing the security myself because I’m a software engineer. Here were my high level goals for this project:

  • Be able to SSH into my Pi.
  • Change the default SSH port (22). Since I’ll be hosting a web server on this Pi, my router’s IP will be publicly exposed, which makes it a target for automated scanning tools to try to crack into my Raspberry Pi with brute force attacks. Although I will keep SSH restricted to the internal network only, it never hurts to be extra safe.
  • Add a firewall to only expose the SSH port (until I start hosting this site).
  • Use public-private key (i.e. key pair) authentication for sign-in and turn off password authentication.

Read More

Silver Star Trip Report

2024-06-10

This past weekend on Saturday June 8th, me and 11 others from the Spokane Mountaineers set out to summit Silver Star Mountain. Two weeks ago, I was supposed to be in Canada attempting to summit Mount Athabasca as my official Spokane Mountaineers graduation climb. Unfortunately, I got quite sick leading up to the climb and had to miss out, so Silver Star became my graduation climb… and what a climb it was.

Initially, we were planning to attempt Mount Baker via the Coleman Glacier route, but after researching the weather conditions and considering the limited experience of our group, we were quite concerned about potential avalanche conditions near the Roman headwall and also generally concerned about weak snow bridges. Instead, we pivoted to Silver Star Mountain because we thought the conditions would be much better. We opted for the Burgundy Col route based on some beta we had gotten from a friend.’

Read More

Dawn - Pride & Prejudice

2024-06-02

Piano Cover by Dario Marianelli

So I’ve been playing piano for just over a year & a half and decided to tackle this song because it’s my wife’s favorite piano song. This definitely is far from perfect (you’ll notice 1 glaring error and several others if you know the song), but I’m happy because I achieved far more than I thought possible. I decided to put out a video with mistakes because YouTube is full of so many nearly perfect videos, and I think it’s okay to not reach that! As long as you’re enjoying what you’re playing and finding meaning in it, that’s all that matters. For me, I am currently going through Alfred’s Adult All-in-One Piano Course (level 2), but I like to challenge myself with more difficult songs on the side to learn or practice new skills. For example, it was just 5 months ago that I was introduced to the sostenuto pedal, and this song is incredible practice with that! It also features polyrhythms and arpeggios, two things I had never tried before. It also features subtle dynamics. This is by far the hardest song I’ve attempted to learn, and I’ve been learning it for the last 2.5 months. Thankfully, the piece is in C Major and features few black keys, or else it probably would have been too difficult for me to even attempt. Anyways, I hope you enjoy!

Read More

Project Euler Problem 30 Solution

2022-10-20

Problem

Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits:

1634=14+64+34+448208=84+24+04+849474=94+44+74+441634=1^4 + 6^4 + 3^4 + 4^4 \\\\ 8208 = 8^4 + 2^4 + 0^4 + 8^4 \\\\ 9474 = 9^4 + 4^4 + 7^4 + 4^4

As 1=141=1^4 is not a sum, it is not included.

The sum of these numbers is 1634+8208+9474=193161634 + 8208 + 9474 = 19316 .

Find the sum of all the numbers that can be written as the sum of fifth powers of their digits.

Read More