BM: Baca dalam Bahasa Melayu
World L4: Remote Kitchens
SSH keys
You will learn: to make a key pair and hang your padlock on a server's door.
Checked with Linux (Debian 13) on 1 Nov 2026
The problem
SSH: A sealed phone line to a far-away kitchen. You type there as if you stood inside. is a sealed phone line to a far-away kitchen. But every call asks for a password. Robots guess passwords all day. There is a better lock.
Try it
A key pair is a padlock and its only key. The padlock (.pub) is safe to give away. The key stays with you. Sort them.
Drag a card into a box. Or tap the card, then tap the box.
Try it
Make your pair. On a real machine, press Enter at each question (or pick a passphrase). Here, they answer themselves.
You are you in /home/you. 0 things here. Services: cron running, ssh running, nginx running.
you@kedai:~$Folder ~
Empty folder
+ 3 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxrunningstarts at boot
Watch
ls -l ~/.ssh after making the pair. Tap the line only you may read.
Tap the private key.
0 of 1 found
Watch
ssh-copy-id hangs your padlock on the server’s door, after one last password. No password after that.
Try it
Now be the server. Hang Aina’s padlock: add aina.pub to ~/.ssh/authorized_keys, then chmod 600 it.
You are you in /home/you. 1 things here. Services: cron running, ssh running, nginx running.
you@kedai:~$Folder ~
- aina.pub (file)
-rw-r--r--
+ 4 hidden (ls -a)
Services
cronrunningstarts at bootsshrunningstarts at bootnginxrunningstarts at boot
Hint
Use>> to add. A single > would wipe the other padlocks!Predict
Your first call to a new server shows this. What is ssh checking?
The authenticity of host '10.0.0.5 (10.0.0.5)' can't be established.
ED25519 key fingerprint is SHA256:aYFyPi8Iw5RKqAeYPFwKCGKES8fXkU1HvaXk3yHsckY.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?Pick one answer.
You did it!
You can now make a key pair and hang your padlock on a server.
Go deeper (optional)
A passphrase locks your key file too; ssh-agent remembers it for a session. The server’s ID card is its host key: The server's own ID card. Your laptop remembers it in ~/.ssh/known_hosts.. Practice keys here are made up. The lab outputs came from two real Debian 13 machines.
Real mission
ssh-keygen -t ed25519 -C "you@laptop"ssh-copy-id you@YOUR-VM-IPssh you@YOUR-VM-IP
0 of 3 steps done · Your ticks are saved.
Bahasa Melayu
SSH ialah talian bermeterai ke dapur yang jauh. Tetapi setiap panggilan minta kata laluan. Robot meneka kata laluan sepanjang hari. Ada mangga yang lebih baik.
Key pair (pasangan kunci) ialah mangga dan satu-satunya kuncinya. Mangga (.pub) selamat diberi. Kuncinya kekal dengan anda. Susun mereka.
Buat pasangan anda. Di mesin sebenar, tekan Enter pada setiap soalan (atau pilih passphrase). Di sini, soalan itu menjawab sendiri.
ls -l ~/.ssh selepas membuat pasangan. Tekan baris yang hanya anda boleh baca.
ssh-copy-id gantung mangga anda di pintu server, selepas satu kata laluan terakhir. Selepas itu tiada lagi kata laluan.
Sekarang jadi server. Gantung mangga Aina: tambah aina.pub ke dalam ~/.ssh/authorized_keys, kemudian chmod 600.
>> untuk menambah. Satu > sahaja akan padam mangga lain!Panggilan pertama anda ke server baharu tunjuk ini. Apa yang ssh sedang semak?
The authenticity of host '10.0.0.5 (10.0.0.5)' can't be established.
ED25519 key fingerprint is SHA256:aYFyPi8Iw5RKqAeYPFwKCGKES8fXkU1HvaXk3yHsckY.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Kini anda boleh buat pasangan kunci dan gantung mangga anda di server.
You finished this before. Practice is always welcome!
Official docs: OpenSSH: ssh-keygen · OpenSSH: ssh-copy-id · Debian wiki: SSH
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?