Skip to main content

Command Palette

Search for a command to run...

[Day 03] - Laptop to Lab -- Lot of Questions

Updated
3 min read
[Day 03] - Laptop to Lab -- Lot of Questions

You already know that I’m in the process of converting my old laptop into a server for my experiments. So far, we have installed headless Debian to make the server more lightweight.

Now let’s move on to what we plan to do today, But when tried to log in to the server for the first time today, I got this:

I was a bit confused by this error at first because I had already logged in to the server via SSH on day 2. After doing some searching, I realized that when I was using Linux Mint before installing the new OS, I had also connected to the old laptop through SSH on my local network. At that time, the laptop’s local IP was 192.168.8.132, but on day 2 I used the x.x.x.133 IP instead

Since my computer had saved the SSH details for the laptop when it was using the .132 IP, it detected something was wrong. From the computer’s perspective, I was actually the imposter.

The reason is simple: the server’s fingerprint changed. SSH blocks the connection to protect you from a man‑in‑the‑middle attack, where someone might pretend to be your server and intercept your data. In this case, I’m the “imposter” because I replaced the old system with a new one.

To fix this, I told my machine to forget the previous fingerprint

ssh-keygen -R 192.168.8.132

After I try to login to server again and now I’m able to login without any problem.

More Problems

Now I can log in to the account, but I still have another problem. When I close the lid of my laptop, the laptop turns off, which causes the server to shut down. To fix this, I edited the logind.conf file

sudo nano /etc/systemd/logind.conf

I change the HandleLidSwitch=ignore to prevent my laptop shut down when the lid close, Once I restart the logind server, Now I’m able to close the lid, But still my server up and running.

Then I ran into another issue: when I tried to use the sudo command, I got an error saying that sudo was not found. I was a bit confused because I assumed every Linux system included the sudo command — but later I discovered that this isn’t always the case.

When I looked into the issue, I learned that…

💡
In the Debian world, if you provide a root password during installation, the installer assumes you want to manage administrative tasks by logging directly into the root account, so it doesn't install the sudo package by default.

But I prefer to use the sudo command with my personal account (I’m still not entirely sure whether this is recommended, but let’s see). So I decided to install the sudo package.

apt update && apt install sudo

After I added my personal account to the sudo group, I was able to use the sudo command from my personal account as well.

Install Ollama

Now let’s do some experiments with Ollama. First, we’ll install Ollama and try an open‑source model. Later, we can try some cool things with Docker as well.

curl -fsSL https://ollama.com/install.sh | sh

But before run this command, I also wanna install curl to my linux system.

The I install llama3.2

It’s working! Now the llama3.2:latest (3B) model is running on my server locally without any cost.

What’s next? Next, I plan to install a web UI so my other devices can access it through a browser. Let’s check that out in action on Day 4 😎

Until then, see you guys!