* 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.

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 in the sign-up form 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

We'll be using a tool called cmder, which is a rather nice terminal that provides ssh stuff for you, too.

generating your keypair

  1. Download a zipped copy of cmder.
  2. Extract cmder.zip
  3. Run the extracted Cmder.exe
  4. You should see a Cmder terminal window that looks sort of like this:

  5. copy and paste the following (paste by right clicking) into the Cmder window and hit Enter:
    mkdir .ssh || ssh-keygen -t rsa -b 2048 -f .ssh/tilde.town
            
  6. If it prompts to make a passphrase, just hit enter.
  7. Things should look like this:

  8. Copy and paste the following (paste by right clicking) into Cmder:
    cat ~/.ssh/tilde.town.pub
            
  9. Things should look like this:

  10. Copy the block that was output starting with ssh-rsa and paste it in the "SSH public key" field on the sign up form (copy by highlighting the text and pressing control + c).
  11. The other file that was generated (.ssh/tilde.town) is your private key. Treat it like a password and never share it with anyone.

using your key

Once ~vilmibm or another admin approves your sign-up, you can connect to tilde.town.

  1. Open Cmder, which we unzipped in the last section.
  2. Type the following in the Cmder window and hit Enter:
    ssh -i ~/.ssh/tilde.town YOURUSERNAME@tilde.town
          
    Replace YOURUSERNAME with the username you signed up with. For example, if your username is sharon_olds, you would run this command:
    ssh -i ~/.ssh/tilde.town sharon_olds@tilde.town
          

Mac OSX

generating your keypair

  1. Open Terminal (in /Applications/Utilities).
  2. In the Terminal window, copy and paste the following and press Enter:
    mkdir -m 700 ~/.ssh                          # Create your .ssh directory
    ssh-keygen -t rsa -b 2048 -f ~/.ssh/tilde.town  # Create your keys
          
  3. Say no when it asks if you want to set a passphrase.
  4. In the Terminal window, copy and paste the following and press Enter:
    cd ~/.ssh          # Go to the .ssh folder in your home folder
    cat tilde.town.pub # Outputs the content of your public key
          
  5. Copy the block that was output in Terminal starting with ssh-rsa and paste it in the "SSH public key" field on the sign up form.
  6. The other file that was generated (~/.ssh/tilde.town) is your private key. Treat it like a password and never share it with anyone.

using your keypair

Once ~vilmibm or another admin approves your sign-up, you can connect to tilde.town.

  1. Open Terminal (in /Applications/Utilities).
  2. Type the following in the Terminal window and hit Enter:
    ssh -i ~/.ssh/tilde.town YOURUSERNAME@tilde.town
          
    Replace YOURUSERNAME with the username you signed up with. For example, if your username is sharon_olds, you would run this command:
    ssh -i ~/.ssh/tilde.town sharon_olds@tilde.town
          

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, copy and paste the following and press Enter:
    mkdir -m 700 ~/.ssh                           # Create a folder called .ssh. It's okay if it already exists.
    ssh-keygen -trsa -b 2048 -f ~/.ssh/tilde.town # create the keypair
          
  3. Say no when it asks if you want to set a passphrase
  4. in the terminal window, copy and paste the following and press Enter:
    cd ~/.ssh          # Go to the .ssh folder in your home folder
    cat tilde.town.pub # Output the content of your public key
          
  5. Copy the block that gets output in the terminal starting with ssh-rsa and paste it in the SSH public key field on the signup form.
  6. The other file that was generated (~/.ssh/tilde.town) is your private key. Treat it like a password and never share it with anyone.

using your keypair

Once ~vilmibm or another admin approves your sign-up, you can connect to tilde.town.

  1. Open your terminal program.
  2. Type the following in the terminal window and hit Enter:
    ssh -i ~/.ssh/tilde.town YOURUSERNAME@tilde.town
          
    Replace YOURUSERNAME with the username you signed up with. For example, if your username is sharon_olds, you would run this command:
    ssh -i ~/.ssh/tilde.town sharon_olds@tilde.town
          

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: 2022-02-08 03:26:28.781920