This is a quick guide on how once can access sdf.org over ssh. The official wiki has a lot of stuff about putty and ARPA Meta so this is for people who prefer a lightweight document.
ARPA Access
One can technically ssh to specific servers on the network using the link above. SDF also provides web interfaces for logging into the servers. However, when setting up ssh, it's much easier IMO to just connect to the proxy and let it route you accordingly:
ssh <username>@tty.sdf.org
Generating your login key
The following instructions are for a mac but work on a variety of unix and unix-like operating systems by default.
Go to your local $HOME directory on your computer.
- cd
- mkdir .ssh
Make sure permissions are properly set:
- chmod go-w .ssh
- cd .ssh
Generate a key pair:
- ssh-keygen -t rsa
Add the key using:
- ssh-add -K
Other types of encryption work as well (ed25519 is quite nice) but this is a fast/easy way to get started. You can also just hit enter when promted or you can add a passphrase which is always recommended.
Next, we will add the key you just created, likely id_rsa.pub if you just left the defaults when generating the key pair.
- Open the id_rsa.pub file in a text editor. I like vim but anything that doesn't add non-unix friendly characters to the end of the line will work. Copy the contents of the file.
Login to sdf manually using the origin login command:
- ssh <username>@tty.sdf.org
- mkdir ~/.ssh
Make sure permissions are properly set:
- chmod go-w .ssh
- cd .ssh
- touch authorized_keys
Open authorized_keys in your preferred text editor (nano, vim, etc) and paste the contents of id_rsa.pub. Save and exit.
Now when you login to sdf, you won't be asked for a password as it will use the private key from your computer to match the public key (_pub) in your authorized_keys file.
A Little Improvement
I don't care much for typing long strings so instead of typing ssh <username>@tty.sdf.org, I create an alias on my local computer to point to sdf. Here's what that looks like using zsh (.zshrc):
- alias sdf="ssh <username>@tty.sdf.org"
Now that you've been through all of that, it's entirely possible to generate keys, copy the public key to SDF, create/append the authorized_keys file with the public key with a one line set of commands but hopefully you learned something doing it this way. Feel free to mail me (mtillman on sdf) improvements and I might post them here.