* Front Page * Table of Contents * Return to Town
ssh primer

ssh primer! for tilde.town!

or, how to connect to another computer and tell it to do cool things

**** if you just want to get right to a tutorial you can skip over this background info ****

While tilde.town is accessible on the web and features lovely web pages written by its users, all of the interaction with tilde.town takes place inside the computer that runs tilde.town as opposed to via web forms that have an effect from outside tilde.town's computer.

This is what sets tilde.town apart from most other online communities. You connect directly to another computer from yours alongside other people and then write your web pages, chat, and play games all via text-based interfaces right on tilde.town's computer.

Prior to the web (which debuted in 1995) this is how pretty much all computer stuff got done. You connected directly to a machine (usually over a direct, physical phone line) and did your work there.

For a long time, people used a tool called telnet to connect to other computers. These days we use a tool called ssh instead.

ssh is a text-based tool that provides a direct connection from your computer to another. ssh is an acronym that stands for Secure Shell. The Shell part refers to the fact that it's a text-based tool; we use the word shell to refer to a text-based interface that you give commands to. The Secure part refers to the fact that, when you're using ssh, no one can spy on your connection to another computer (unlike the old telnet command).

why bother with all of this? passwords are really insecure and hard to manage. Using keys makes life easier for you, fair user (your account is less likely to be hacked) and for me, your humble sysadmin (less administration than passwords).

ssh tutorial!

The end goal of this tutorial is to make a key pair. That's a set of two files full of numbers and letters. One file is public (your public key) and the other private (your private key). You'll be submitting the public key as part of redeeming a tilde.town invite code and using the private key when you connect to tilde.town using ssh.

choose your operating system: windows | mac osx | linux | android | ios

bonus: SSH config tricks


Windows

Windows 10 added support for ssh, so if you are on Windows 10 or Windows 11 you should have ssh assuming you are on a recent version of either one.

making a key pair

  1. Open the start menu
  2. Type "powershell" and hit enter
  3. A window should open that looks something like:

  4. Type ssh-keygen -t rsa -b 2048 and hit enter.
  5. Hit enter through each prompt (you can set a passphrase if you want to but you do not need to).
  6. Once ssh-keygen is done, you have a key pair! The public key lives in .ssh/id_rsa.pub and the private key is in .ssh/id_rsa.
  7. You can now type notepad.exe .ssh/id_rsa.pub and hit enter. This will open Notepad. You can highlight the key there and press control+c to copy it..

using your public key to finalize your town account

  1. If you are trying to redeem a tilde.town invite code, type ssh welcome@tilde.town in your terminal and hit enter.
  2. Answer each prompt and when asked for a public SSH key, paste the public key you copied earlier by right clicking.
  3. Finish up the prompts. You should now have a town account.

accessing the town

Now and in the future, you can type ssh yourname@tilde.town replacing yourname with your username to connect to the town.

Important! Remeber that your private key (called id_rsa without the .pub) is a secret!. Never paste it or upload it anywhere. It should always stay right on your computer. Your public key, however, can be seen by anyone at any time without worry.


Mac OSX

generating your keypair

  1. Open Terminal (in /Applications/Utilities).
  2. In the Terminal window, type ssh-keygen -t rsa -b 2048 and press enter.
  3. Press enter to go through each prompt
  4. type cat .ssh/id_rsa.pub.
  5. Copy the block that was output in Terminal starting with ssh-rsa and ending with something like "user@host." by highlighting it and pressing cmd+c.

using your public key to finalize your town account

  1. If you are trying to redeem a tilde.town invite code, type ssh welcome@tilde.town in your terminal and hit enter.
  2. Answer each prompt and when asked for a public SSH key, paste the public key you copied earlier by pressing cmd+v
  3. Finish up the prompts. You should now have a town account.

accessing the town

Now and in the future, you can type ssh yourname@tilde.town replacing yourname with your username to connect to the town.

Important! Remeber that your private key (called id_rsa without the .pub) is a secret!. Never paste it or upload it anywhere. It should always stay right on your computer. Your public key, however, can be seen by anyone at any time without worry.


Linux

There are lots of different Linux distributions out there but they should all have ssh, ssh-keygen, and a terminal program.

generating your keypair

  1. Open a terminal.
  2. in the terminal window, type ssh-keygen -t rsa -b 2048 and press enter.
  3. Press enter to go through each prompt
  4. type cat .ssh/id_rsa.pub.
  5. Copy the block that was output in Terminal starting with ssh-rsa and ending with something like "user@host." by highlighting it and pressing ctrl+shift+c.

using your public key to finalize your town account

  1. If you are trying to redeem a tilde.town invite code, type ssh welcome@tilde.town in your terminal and hit enter.
  2. Answer each prompt and when asked for a public SSH key, paste the public key you copied earlier by pressing cmd+v
  3. Finish up the prompts. You should now have a town account.

accessing the town

Now and in the future, you can type ssh yourname@tilde.town replacing yourname with your username to connect to the town.

Important! Remeber that your private key (called id_rsa without the .pub) is a secret!. Never paste it or upload it anywhere. It should always stay right on your computer. Your public key, however, can be seen by anyone at any time without worry.


Android

This is kind of a bonus round! Check out JuiceSSH and this tutorial for generating a keypair and this tutorial for connecting.


iOS

Check out Termius for SSH on iOS. If you already have a key pair, you can import it). Then add tilde.town as a host (see this tutorial).


SSH Config Tricks

Add the following to your ~/.ssh/config to ssh in with just ssh tilde!

Host tilde
Hostname tilde.town
User YOURUSERNAME
IdentityFile ~/.ssh/tilde.town

(Replace YOURUSERNAME with the username you signed up with.)


IMPORTANT! this tutorial is based on and uses parts of the tilde.club ssh primer.

last compiled: 2024-01-23 01:58:22.544311