forked from team/site
1
0
Fork 0

ssh guide

This commit is contained in:
Ben Harris 2018-06-08 20:22:19 -04:00
parent 2fccb02c0a
commit d84c5dd945
3 changed files with 204 additions and 11 deletions

View File

@ -1,5 +1,15 @@
<?php
require __DIR__.'/../vendor/autoload.php';
$additional_head = '
<style>
a.anchor {
display: block;
position: relative;
top: -250px;
visibility: hidden;
}
</style>
';
include __DIR__.'/../header.php';
$parser = new Mni\FrontYAML\Parser();

View File

@ -6,25 +6,167 @@ category:
- main
---
## ssh keys
# ssh
*or, how to tell other computers to do cool things*
password authentication for ssh is inherently insecure.
---
tilde.team will be disabling ssh password authentication starting July 1, 2018.
> tilde.team will be disabling ssh password authentication starting august 1, 2018.
all users will be required to create an ssh keypair before then, or will be required to proceed with manual account recovery with [~ben](/~ben/)
> all users will be required to create an ssh keypair before then, or will be required to proceed with manual account recovery with [~ben](/~ben/)
### how to make an ssh key
** if you just want to get right to a tutorial you can [skip over this background info](#tutorial)**
#### mac
while [tilde.team](https://tilde.team) is accessible on the web and features lovely web pages written by its users, all of the interaction with tilde.team takes place **inside the machine** that runs tilde.team as opposed to via web forms that have an effect from **outside** tilde.team's computer.
#### windows
this is what sets tilde.team 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.team's computer.
#### linux
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`](https://en.wikipedia.org/wiki/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).
### what to do next
* get your public key to [~ben](/~ben/)
* profit?
---
## how to make an ssh key
<a class="anchor" name="tutorial"></a>
pick your fighter: [[mac](#mac)] | [[windows](#windows)] | [[linux](#linux)]
---
### mac
<a class="anchor" name="mac"></a>
#### generating your keypair
1. open terminal (it's in `/Applications/Utilities`)
1. create your .ssh directory:
```bash
mkdir -m 700 ~/.ssh
```
1. create your keys:
```bash
ssh-keygen -t rsa -b 2048
```
1. if you press enter to accept the defaults, your public and private key will be located at `~/.ssh/id_rsa.pub` and `~/.ssh/id_rsa` respectively
1. `cat ~/.ssh/id_rsa.pub`
1. copy the output of the last command and paste it in the sshkey field on the signup form (or email it to [~ben](mailto:ben@tilde.team) if you already have an account)
#### using your keypair
once [~ben](https://tilde.team/~ben/) or another admin approves your signup, you can join the tilde.team
1. open terminal (it's in `/Applications/Utilities`)
1. `ssh` to tilde.team:
```bash
ssh username@tilde.team
```
where username is your username (~ben would use `ssh ben@tilde.team`)
1. profit???
---
### windows
<a class="anchor" name="windows"></a>
there are a couple options for using ssh on windows these days. i like to use [git bash](https://git-scm.com).
#### generating your keypair
choose from any of the following options:
* [windows subsystem for linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
* [cmder](http://cmder.net)
* [cygwin](https://cygwin.com)
* [putty](https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
* [msys2](http://www.msys2.org/)
* [git bash](https://git-scm.com)
1. open your new shell
1. create your .ssh directory
```bash
mkdir .ssh
```
1. create your keypair
```bash
ssh-keygen -t rsa -b 2048
```
1. if you press enter to accept the defaults, your public and private key will be located at `~/.ssh/id_rsa.pub` and `~/.ssh/id_rsa` respectively
1. `cat ~/.ssh/id_rsa.pub`
1. copy the output of the last command and paste it in the sshkey field on the signup form (or email it to [~ben](mailto:ben@tilde.team) if you already have an account)
#### using your keypair
once [~ben](https://tilde.team/~ben/) or another admin approves your signup, you can join the tilde.team
1. open terminal (it's in `/Applications/Utilities`)
1. `ssh` to tilde.team:
```bash
ssh username@tilde.team
```
where username is your username (~ben would use `ssh ben@tilde.team`)
1. profit???
---
### linux
<a class="anchor" name="linux"></a>
there are a lot of linux distros, but `ssh` and `ssh-keygen` should be available in almost all cases.
#### generating your keypair
1. make sure you have a `~/.ssh` directory
```bash
mkdir -m 700 ~/.ssh
```
1. create your keys
```bash
ssh-keygen -t rsa -b 2048
```
1. if you press enter to accept the defaults, your public and private key will be located at `~/.ssh/id_rsa.pub` and `~/.ssh/id_rsa` respectively
1. `cat ~/.ssh/id_rsa.pub`
1. copy the output of the last command and paste it in the sshkey field on the signup form (or email it to [~ben](mailto:ben@tilde.team) if you already have an account)
#### using your keypair
once [~ben](https://tilde.team/~ben/) or another admin approves your signup, you can join the tilde.team
1. open a terminal (this depends on your distro)
1. `ssh` to tilde.team:
```bash
ssh username@tilde.team
```
where username is your username (~ben would use `ssh ben@tilde.team`)
1. profit???
---
this tutorial is based on and uses parts of [the tilde.club ssh primer](https://github.com/tildeclub/tilde.club/blob/master/docs/ssh.md) and [the tilde.town ssh guide](https://tilde.town/wiki/ssh.html).

41
wiki/pages/tildeblogs.md Normal file
View File

@ -0,0 +1,41 @@
---
author: ~ben
published: true
title: tildeblogs
category:
- main
---
# tildeblogs with [bashblog](https://github.com/cfenollosa/bashblog)
---
tildeblogs can be built with [bashblog](https://github.com/cfenollosa/bashblog)
change to your ~/public_html/blog directory: `cd ~/public_html/blog` (or somewhere else in ~/public_html, however you like)
bashblog is available system-wide as `bb`
---
## usage
1. `bb post`
1. write a post (it will open your preferred $EDITOR for you)
1. save, close, and then select from the bashblog menu choices
---
## advanced
edit the `.config` file to change the name and url and other settings for your blog
for an example of customization, see [~ben's blog](https://tilde.team/~ben/blog/) ([source](https://git.tilde.team/ben/tilde/src/branch/master/blog/.config)).
for more details: see [the bashblog repo](https://github.com/cfenollosa/bashblog)
---
of course, you're free to use any other blogging software :)