basic signup and wiki

This commit is contained in:
root 2019-09-14 14:29:05 -04:00
parent 1e5a430d3a
commit 6ef1fbf131
15 changed files with 12589 additions and 2 deletions

View File

@ -1 +1,3 @@
</body>
</html>

View File

@ -1,6 +1,9 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?=isset($title) ? $title : "Welcome to ~tilde.club~"?></title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="/style.css">
</head>
<body>

9861
signup/email/Net/DNS2.php Normal file

File diff suppressed because it is too large Load Diff

210
signup/email/ipaddr.php Normal file
View File

@ -0,0 +1,210 @@
<?php
// CubicleSoft PHP IP Address functions.
// (C) 2013 CubicleSoft. All Rights Reserved.
class IPAddr
{
static function NormalizeIP($ipaddr)
{
$ipv4addr = "";
$ipv6addr = "";
// Generate IPv6 address.
$ipaddr = strtolower(trim($ipaddr));
if (strpos($ipaddr, ":") === false) $ipaddr = "::ffff:" . $ipaddr;
$ipaddr = explode(":", $ipaddr);
if (count($ipaddr) < 3) $ipaddr = array("", "", "0");
$ipaddr2 = array();
$foundpos = false;
foreach ($ipaddr as $num => $segment)
{
$segment = trim($segment);
if ($segment != "") $ipaddr2[] = $segment;
else if ($foundpos === false && count($ipaddr) > $num + 1 && $ipaddr[$num + 1] != "")
{
$foundpos = count($ipaddr2);
$ipaddr2[] = "0000";
}
}
// Convert ::ffff:123.123.123.123 format.
if (strpos($ipaddr2[count($ipaddr2) - 1], ".") !== false)
{
$x = count($ipaddr2) - 1;
if ($ipaddr2[count($ipaddr2) - 2] != "ffff") $ipaddr2[$x] = "0";
else
{
$ipaddr = explode(".", $ipaddr2[$x]);
if (count($ipaddr) != 4) $ipaddr2[$x] = "0";
else
{
$ipaddr2[$x] = str_pad(strtolower(dechex($ipaddr[0])), 2, "0", STR_PAD_LEFT) . str_pad(strtolower(dechex($ipaddr[1])), 2, "0", STR_PAD_LEFT);
$ipaddr2[] = str_pad(strtolower(dechex($ipaddr[2])), 2, "0", STR_PAD_LEFT) . str_pad(strtolower(dechex($ipaddr[3])), 2, "0", STR_PAD_LEFT);
}
}
}
$ipaddr = array_slice($ipaddr2, 0, 8);
if ($foundpos !== false && count($ipaddr) < 8) array_splice($ipaddr, $foundpos, 0, array_fill(0, 8 - count($ipaddr), "0000"));
foreach ($ipaddr as $num => $segment)
{
$ipaddr[$num] = substr(str_pad(strtolower(dechex(hexdec($segment))), 4, "0", STR_PAD_LEFT), -4);
}
$ipv6addr = implode(":", $ipaddr);
// Extract IPv4 address.
if (substr($ipv6addr, 0, 30) == "0000:0000:0000:0000:0000:ffff:") $ipv4addr = hexdec(substr($ipv6addr, 30, 2)) . "." . hexdec(substr($ipv6addr, 32, 2)) . "." . hexdec(substr($ipv6addr, 35, 2)) . "." . hexdec(substr($ipv6addr, 37, 2));
// Make a short IPv6 address.
$shortipv6 = $ipv6addr;
$pattern = "0000:0000:0000:0000:0000:0000:0000";
do
{
$shortipv6 = str_replace($pattern, ":", $shortipv6);
$pattern = substr($pattern, 5);
} while (strlen($shortipv6) == 39 && $pattern != "");
$shortipv6 = explode(":", $shortipv6);
foreach ($shortipv6 as $num => $segment)
{
if ($segment != "") $shortipv6[$num] = strtolower(dechex(hexdec($segment)));
}
$shortipv6 = implode(":", $shortipv6);
return array("ipv6" => $ipv6addr, "shortipv6" => $shortipv6, "ipv4" => $ipv4addr);
}
static function GetRemoteIP($proxies = array())
{
$ipaddr = self::NormalizeIP(isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : "127.0.0.1");
// Check for trusted proxies. Stop at first untrusted IP in the chain.
if (isset($proxies[$ipaddr["ipv6"]]) || ($ipaddr["ipv4"] != "" && isset($proxies[$ipaddr["ipv4"]])))
{
$xforward = (isset($_SERVER["HTTP_X_FORWARDED_FOR"]) ? explode(",", $_SERVER["HTTP_X_FORWARDED_FOR"]) : array());
$clientip = (isset($_SERVER["HTTP_CLIENT_IP"]) ? explode(",", $_SERVER["HTTP_CLIENT_IP"]) : array());
do
{
$found = false;
if (isset($proxies[$ipaddr["ipv6"]])) $header = $proxies[$ipaddr["ipv6"]];
else $header = $proxies[$ipaddr["ipv4"]];
$header = strtolower($header);
if ($header == "xforward" && count($xforward) > 0)
{
$ipaddr = self::NormalizeIP(array_pop($xforward));
$found = true;
}
else if ($header == "clientip" && count($clientip) > 0)
{
$ipaddr = self::NormalizeIP(array_pop($clientip));
$found = true;
}
} while ($found && (isset($proxies[$ipaddr["ipv6"]]) || ($ipaddr["ipv4"] != "" && isset($proxies[$ipaddr["ipv4"]]))));
}
return $ipaddr;
}
static function IsMatch($pattern, $ipaddr)
{
if (is_string($ipaddr)) $ipaddr = self::NormalizeIP($ipaddr);
if (strpos($pattern, ":") !== false)
{
// Pattern is IPv6.
$pattern = explode(":", strtolower($pattern));
$ipaddr = explode(":", $ipaddr["ipv6"]);
if (count($pattern) != 8 || count($ipaddr) != 8) return false;
foreach ($pattern as $num => $segment)
{
$found = false;
$pieces = explode(",", $segment);
foreach ($pieces as $piece)
{
$piece = trim($piece);
$piece = explode(".", $piece);
if (count($piece) == 1)
{
$piece = $piece[0];
if ($piece == "*") $found = true;
else if (strpos($piece, "-") !== false)
{
$range = explode("-", $piece);
$range[0] = hexdec($range[0]);
$range[1] = hexdec($range[1]);
$val = hexdec($ipaddr[$num]);
if ($range[0] > $range[1]) $range[0] = $range[1];
if ($val >= $range[0] && $val <= $range[1]) $found = true;
}
else if ($piece === $ipaddr[$num]) $found = true;
}
else if (count($piece) == 2)
{
// Special IPv4-like notation.
$found2 = false;
$found3 = false;
$val = hexdec(substr($ipaddr[$num], 0, 2));
$val2 = hexdec(substr($ipaddr[$num], 2, 2));
if ($piece[0] == "*") $found2 = true;
else if (strpos($piece[0], "-") !== false)
{
$range = explode("-", $piece[0]);
if ($range[0] > $range[1]) $range[0] = $range[1];
if ($val >= $range[0] && $val <= $range[1]) $found2 = true;
}
else if ($piece[0] == $val) $found2 = true;
if ($piece[1] == "*") $found3 = true;
else if (strpos($piece[1], "-") !== false)
{
$range = explode("-", $piece[1]);
if ($range[0] > $range[1]) $range[0] = $range[1];
if ($val >= $range[0] && $val <= $range[1]) $found3 = true;
}
else if ($piece[1] == $val2) $found3 = true;
if ($found2 && $found3) $found = true;
}
if ($found) break;
}
if (!$found) return false;
}
}
else
{
// Pattern is IPv4.
$pattern = explode(".", strtolower($pattern));
$ipaddr = explode(".", $ipaddr["ipv4"]);
if (count($pattern) != 4 || count($ipaddr) != 4) return false;
foreach ($pattern as $num => $segment)
{
$found = false;
$pieces = explode(",", $segment);
foreach ($pieces as $piece)
{
$piece = trim($piece);
if ($piece == "*") $found = true;
else if (strpos($piece, "-") !== false)
{
$range = explode("-", $piece);
if ($range[0] > $range[1]) $range[0] = $range[1];
if ($ipaddr[$num] >= $range[0] && $ipaddr[$num] <= $range[1]) $found = true;
}
else if ($piece == $ipaddr[$num]) $found = true;
if ($found) break;
}
if (!$found) return false;
}
}
return true;
}
}
?>

1519
signup/email/smtp.php Normal file

File diff suppressed because it is too large Load Diff

208
signup/email/utf8.php Normal file
View File

@ -0,0 +1,208 @@
<?php
// CubicleSoft PHP UTF8 (Unicode) functions.
// (C) 2014 CubicleSoft. All Rights Reserved.
class UTF8
{
// Removes invalid characters from the data string.
// http://www.w3.org/International/questions/qa-forms-utf-8
public static function MakeValid($data)
{
$result = "";
$x = 0;
$y = strlen($data);
while ($x < $y)
{
$tempchr = ord($data[$x]);
if ($y - $x > 1) $tempchr2 = ord($data[$x + 1]);
else $tempchr2 = 0x00;
if ($y - $x > 2) $tempchr3 = ord($data[$x + 2]);
else $tempchr3 = 0x00;
if ($y - $x > 3) $tempchr4 = ord($data[$x + 3]);
else $tempchr4 = 0x00;
if ($tempchr == 0x09 || $tempchr == 0x0A || $tempchr == 0x0D || ($tempchr >= 0x20 && $tempchr <= 0x7E))
{
// ASCII minus control and special characters.
$result .= chr($tempchr);
$x++;
}
else if (($tempchr >= 0xC2 && $tempchr <= 0xDF) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF))
{
// Non-overlong (2 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$x += 2;
}
else if ($tempchr == 0xE0 && ($tempchr2 >= 0xA0 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF))
{
// Non-overlong (3 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$result .= chr($tempchr3);
$x += 3;
}
else if ((($tempchr >= 0xE1 && $tempchr <= 0xEC) || $tempchr == 0xEE || $tempchr == 0xEF) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF))
{
// Normal/straight (3 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$result .= chr($tempchr3);
$x += 3;
}
else if ($tempchr == 0xED && ($tempchr2 >= 0x80 && $tempchr2 <= 0x9F) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF))
{
// Non-surrogates (3 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$result .= chr($tempchr3);
$x += 3;
}
else if ($tempchr == 0xF0 && ($tempchr2 >= 0x90 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF))
{
// Planes 1-3 (4 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$result .= chr($tempchr3);
$result .= chr($tempchr4);
$x += 4;
}
else if (($tempchr >= 0xF1 && $tempchr <= 0xF3) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF))
{
// Planes 4-15 (4 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$result .= chr($tempchr3);
$result .= chr($tempchr4);
$x += 4;
}
else if ($tempchr == 0xF4 && ($tempchr2 >= 0x80 && $tempchr2 <= 0x8F) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF))
{
// Plane 16 (4 bytes).
$result .= chr($tempchr);
$result .= chr($tempchr2);
$result .= chr($tempchr3);
$result .= chr($tempchr4);
$x += 4;
}
else $x++;
}
return $result;
}
public static function IsValid($data)
{
$x = 0;
$y = strlen($data);
while ($x < $y)
{
$tempchr = ord($data[$x]);
if ($y - $x > 1) $tempchr2 = ord($data[$x + 1]);
else $tempchr2 = 0x00;
if ($y - $x > 2) $tempchr3 = ord($data[$x + 2]);
else $tempchr3 = 0x00;
if ($y - $x > 3) $tempchr4 = ord($data[$x + 3]);
else $tempchr4 = 0x00;
if ($tempchr == 0x09 || $tempchr == 0x0A || $tempchr == 0x0D || ($tempchr >= 0x20 && $tempchr <= 0x7E)) $x++;
else if (($tempchr >= 0xC2 && $tempchr <= 0xDF) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF)) $x += 2;
else if ($tempchr == 0xE0 && ($tempchr2 >= 0xA0 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF)) $x += 3;
else if ((($tempchr >= 0xE1 && $tempchr <= 0xEC) || $tempchr == 0xEE || $tempchr == 0xEF) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF)) $x += 3;
else if ($tempchr == 0xED && ($tempchr2 >= 0x80 && $tempchr2 <= 0x9F) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF)) $x += 3;
else if ($tempchr == 0xF0 && ($tempchr2 >= 0x90 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF)) $x += 4;
else if (($tempchr >= 0xF1 && $tempchr <= 0xF3) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF)) $x += 4;
else if ($tempchr == 0xF4 && ($tempchr2 >= 0x80 && $tempchr2 <= 0x8F) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF)) $x += 4;
else return false;
}
return true;
}
// Locates the next UTF8 character in a UTF8 string.
// Set Pos and Size to 0 to start at the beginning.
// Returns false at the end of the string or bad UTF8 character. Otherwise, returns true.
public static function NextChrPos(&$data, $datalen, &$pos, &$size)
{
$pos += $size;
$size = 0;
$x = $pos;
$y = $datalen;
if ($x >= $y) return false;
$tempchr = ord($data[$x]);
if ($y - $x > 1) $tempchr2 = ord($data[$x + 1]);
else $tempchr2 = 0x00;
if ($y - $x > 2) $tempchr3 = ord($data[$x + 2]);
else $tempchr3 = 0x00;
if ($y - $x > 3) $tempchr4 = ord($data[$x + 3]);
else $tempchr4 = 0x00;
if ($tempchr == 0x09 || $tempchr == 0x0A || $tempchr == 0x0D || ($tempchr >= 0x20 && $tempchr <= 0x7E)) $size = 1;
else if (($tempchr >= 0xC2 && $tempchr <= 0xDF) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF)) $size = 2;
else if ($tempchr == 0xE0 && ($tempchr2 >= 0xA0 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF)) $size = 3;
else if ((($tempchr >= 0xE1 && $tempchr <= 0xEC) || $tempchr == 0xEE || $tempchr == 0xEF) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF)) $size = 3;
else if ($tempchr == 0xED && ($tempchr2 >= 0x80 && $tempchr2 <= 0x9F) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF)) $size = 3;
else if ($tempchr == 0xF0 && ($tempchr2 >= 0x90 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF)) $size = 4;
else if (($tempchr >= 0xF1 && $tempchr <= 0xF3) && ($tempchr2 >= 0x80 && $tempchr2 <= 0xBF) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF)) $size = 4;
else if ($tempchr == 0xF4 && ($tempchr2 >= 0x80 && $tempchr2 <= 0x8F) && ($tempchr3 >= 0x80 && $tempchr3 <= 0xBF) && ($tempchr4 >= 0x80 && $tempchr4 <= 0xBF)) $size = 4;
else return false;
return true;
}
// Determines if a UTF8 string can also be viewed as ASCII.
public static function IsASCII($data)
{
$pos = 0;
$size = 0;
$y = strlen($data);
while (self::NextChrPos($data, $y, $pos, $size) && $size == 1) {}
if ($pos < $y || $size > 1) return false;
return true;
}
// Returns the number of characters in a UTF8 string.
public static function strlen($data)
{
$num = 0;
$pos = 0;
$size = 0;
$y = strlen($data);
while (self::NextChrPos($data, $y, $pos, $size)) $num++;
return $num;
}
// Converts a UTF8 string to ASCII and drops bad UTF8 and non-ASCII characters in the process.
public static function ConvertToASCII($data)
{
$result = "";
$pos = 0;
$size = 0;
$y = strlen($data);
while ($pos < $y)
{
if (self::NextChrPos($data, $y, $pos, $size) && $size == 1) $result .= $data[$pos];
else if (!$size) $size = 1;
}
return $result;
}
// Converts UTF8 characters in a string to HTML entities.
public static function ConvertToHTML($data)
{
return preg_replace_callback('/([\xC0-\xF7]{1,1}[\x80-\xBF]+)/', 'UTF8::ConvertToHTML__Callback', $data);
}
private static function ConvertToHTML__Callback($data)
{
$data = $data[1];
$num = 0;
$data = str_split(strrev(chr((ord(substr($data, 0, 1)) % 252 % 248 % 240 % 224 % 192) + 128) . substr($data, 1)));
foreach ($data as $k => $v) $num += (ord($v) % 128) * pow(64, $k);
return "&#" . $num . ";";
}
}
?>

View File

@ -1,2 +1,53 @@
<?php
echo "hi";
$title = "sign up for the tilde.club!";
include __DIR__."/../header.php";
?>
<h1>devmode!! please do not use yet!!</h1>
<h1>sign up to join tilde.club</h1>
<p>we're excited you're here! let's get you signed up!</p>
<p>fill out this form and we'll get back to you with account info</p>
<table>
<tr>
<td>
<form method="post">
<?php include 'signup-handler.php'; ?>
<div>
<p>your desired username (numbers and lowercase letters only, no spaces)</p>
<input class="form-control" name="username" value="<?=$_REQUEST["username"] ?? ""?>" type="text" required>
</div>
<div>
<p>email to contact you with account info</p>
<input class="form-control" name="email" value="<?=$_REQUEST["email"] ?? ""?>" type="text" required>
</div>
<div>
<p>what interests you about tilde.club? we want to make sure you're a real human being :)</p>
<textarea class="form-control" name="interest" id="" cols="30" rows="10"><?=$_REQUEST["interest"] ?? ""?></textarea>
</div>
<div>
<p>SSH public key</p>
<textarea required class="form-control" name="sshkey" id="" cols="30" rows="10"><?=$_REQUEST["sshkey"] ?? ""?></textarea>
<p>if you don't have a key, don't worry! <a href="https://tilde.club/wiki/ssh.html">check out our guide to ssh keys</a> and make sure that you only put your pubkey here</p>
</div>
<p>
<em>signing up implies that you agree to abide by the rule of NO DRAMA</em>
<br>
no drama. be respectful. have fun. we're all trying, and we're all in this together :)
</p>
<button class="btn btn-primary" type="submit">submit</button>
</form>
</td>
</tr>
</table>
<?php include __DIR__."/../footer.php";

128
signup/signup-handler.php Normal file
View File

@ -0,0 +1,128 @@
<?php
require_once "email/smtp.php";
function forbidden_name($name) {
return in_array($name, [
'0x0',
'abuse',
'admin',
'administrator',
'auth',
'autoconfig',
'bbj',
'broadcasthost',
'cloud',
'forum',
'ftp',
'git',
'gopher',
'hostmaster',
'imap',
'info',
'irc',
'is',
'isatap',
'it',
'localdomain',
'localhost',
'lounge',
'mail',
'mailer-daemon',
'marketing',
'marketting',
'mis',
'news',
'nobody',
'noc',
'noreply',
'pop',
'pop3',
'postmaster',
'retro',
'root',
'sales',
'security',
'smtp',
'ssladmin',
'ssladministrator',
'sslwebmaster',
'support',
'sysadmin',
'team',
'usenet',
'uucp',
'webmaster',
'wpad',
'www',
'znc',
]);
}
$message = "";
if (isset($_REQUEST["username"]) && isset($_REQUEST["email"])) {
// Check the name.
$name = trim($_REQUEST["username"]);
if ($name == "")
$message .= "<li>please fill in your desired username</li>";
if (strlen($name) > 32)
$message .= "<li>username too long (32 character max)</li>";
if (!preg_match('/^[a-z][a-z0-9]{2,31}$/', $name))
$message .= "<li>username contains invalid characters (lowercase only, must start with a letter)</li>";
if ($_REQUEST["sshkey"] == "" || mb_substr($_REQUEST["sshkey"], 0, 4) !== "ssh-")
$message .= '<li>ssh key required: please create one and submit the public key. '
. 'see our <a href="https://tilde.club/wiki/ssh.html">ssh wiki</a> or '
. 'hop on <a href="https://web.tilde.chat/?join=club">irc</a> and ask for help</li>';
if ($_REQUEST["interest"] == "")
$message .= "<li>please explain why you're interested so we can make sure you're a real human being</li>";
if (posix_getpwnam($name) || forbidden_name($name))
$message .= "<li>sorry, the username $name is unavailable</li>";
// Check the e-mail address.
$email = trim($_REQUEST["email"]);
if ($email == "")
$message .= "<li>please fill in your email address</li>";
else {
$result = SMTP::MakeValidEmailAddress($_REQUEST["email"]);
if (!$result["success"])
$message .= "<li>invalid email address: " . htmlspecialchars($result["error"]) . "</li>";
elseif ($result["email"] != $email)
$message .= "<li>invalid email address. did you mean: " . htmlspecialchars($result["email"]) . "</li>";
}
// no validation errors
if ($message == "") {
$msgbody = "
username: {$_REQUEST["username"]}
email: {$_REQUEST["email"]}
reason: {$_REQUEST["interest"]}
makeuser {$_REQUEST["username"]} {$_REQUEST["email"]} \"{$_REQUEST["sshkey"]}\"
";
if (mail('root', 'new tilde.club signup', $msgbody)) {
echo '<div class="alert alert-success" role="alert">
email sent! we\'ll get back to you soon (usually within a day) with login instructions! <a href="/">back to tilde.club home</a>
</div>';
} else {
echo '<div class="alert alert-danger" role="alert">
something went wrong... please send an email to <a href="mailto:root@tilde.club">root@tilde.club</a> with details of what happened
</div>';
}
} else {
?>
<div class="alert alert-warning" role="alert">
<strong>please correct the following errors: </strong>
<?=$message?>
</div>
<?php
}
}
?>

View File

@ -33,6 +33,18 @@ h1 {text-transform:uppercase;font-weight:bold;
animation-iteration-count: infinite;
}
input[type="text"], textarea {
background-color : #333;
color: darkorange;
}
div.alert-warning {
background-color: darkred;
}
div.alert-success {
background-color: darkgreen;
}
@-moz-keyframes blinker {
0% { opacity: 1.0; }
50% { opacity: 0.75; }

10
wiki/README.md Normal file
View File

@ -0,0 +1,10 @@
# tilde.club wiki
to write an article, make a markdown file in source/ and fill out the appropriate
metadata keys (see source/ssh.md).
run
./build-wiki.sh
before committing, and open a PR!

7
wiki/build-wiki.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
for page in source/*.md; do
pagename=$(basename $page ".md")
pandoc --template pandoc-template.html -o "$pagename.html" "source/$pagename.md"
done

17
wiki/index.php Normal file
View File

@ -0,0 +1,17 @@
<?php
$title = "tilde.club wiki";
include __DIR__."/../header.php";
?>
<h1>the tilde.club wiki</h1>
<p>here's the articles on our wiki:</p>
<ul>
<?php foreach (glob("source/*.md") as $article) {
$article = basename($article, ".md"); ?>
<li><a href="/wiki/<?=$article?>.html"><?=$article?></a></li>
<?php } ?>
</ul>
<?php include __DIR__."/../footer.php";

80
wiki/pandoc-template.html Normal file
View File

@ -0,0 +1,80 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="$lang$" xml:lang="$lang$"$if(dir)$ dir="$dir$"$endif$>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
$for(author-meta)$
<meta name="author" content="$author-meta$" />
$endfor$
$if(date-meta)$
<meta name="dcterms.date" content="$date-meta$" />
$endif$
$if(keywords)$
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
$endif$
<title>$if(title-prefix)$$title-prefix$ $endif$$pagetitle$</title>
<link rel="stylesheet" href="/style.css">
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
$if(quotes)$
q { quotes: "“" "”" "" ""; }
$endif$
</style>
$if(highlighting-css)$
<style type="text/css">
$highlighting-css$
</style>
$endif$
$for(css)$
<link rel="stylesheet" href="$css$" />
$endfor$
$if(math)$
$math$
$endif$
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
$for(header-includes)$
$header-includes$
$endfor$
</head>
<body>
<a href="/wiki/">&lt; back to wiki home</a>
$for(include-before)$
$include-before$
$endfor$
$if(title)$
<header>
<h1 class="title">$title$</h1>
$if(subtitle)$
<p class="subtitle">$subtitle$</p>
$endif$
$if(author)$
<p>authors:</p>
$for(author)$
<p class="author"><a href="/~$author$/">~$author$</a></p>
$endfor$
$endif$
$if(date)$
<p class="date">$date$</p>
$endif$
</header>
$endif$
$if(toc)$
<nav id="$idprefix$TOC">
$table-of-contents$
</nav>
$endif$
$body$
$for(include-after)$
$include-after$
$endfor$
</body>
</html>

258
wiki/source/ssh.md Normal file
View File

@ -0,0 +1,258 @@
---
author: benharri
published: true
title: ssh
description: ssh tutorial and background info
category:
- main
---
_or, how to tell other computers to do cool things_
---
> all users are required to use an ssh keypair for login, or will be required
to proceed with manual account recovery
## tilde.club details
for example, to connect to tilde.club, you can do:
```
ssh user@tilde.club
mosh user@tilde.club
```
---
## intro
** if you just want to get right to a tutorial you can
[skip over this background info](#how-to-make-an-ssh-key)**
while [tilde.club](https://tilde.club) is accessible on the web and features
lovely web pages written by its users, most interaction with tilde.club takes
place **inside the machine** that runs tilde.club as opposed to via web forms
that have an effect from **outside** tilde.club's computer.
this is what sets tilde.club 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.club'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`](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).
---
## how to make an ssh key
SSH supports a handful of types of cryptographic keys. The most used are [RSA](
<https://en.wikipedia.org/wiki/RSA_(cryptosystem)>) and the more modern [Ed25519](
https://en.wikipedia.org/wiki/EdDSA#Ed25519).
RSA is the de-facto standard and is supported everywhere (just choose a big
enough key like 4096 bits to be secure). Ed25519 is designed to be faster and
smaller withouth sacrificing security, so is best suited for embedded devices
or machines with low resources. It's supported on tilde (and really on any
modern system) but you may find older systems which do not support it.
Below you'll find instructions to generate either type (or both if you want).
Keep in mind that these instructions leave your private keys unencrypted in
your local hard disk. So keep them private; never share them. A good solution
is to provide a password for them at creation time, but this implies entering
a password any time you used them (impractical) or use something like [ssh-agent](
https://man.openbsd.org/ssh-agent.1) (a bit more complex)
pick your fighter: [[mac](#mac)] | [[windows](#windows)] | [[linux](#linux)]
---
### mac
#### 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:
for rsa keys:
```bash
ssh-keygen -t rsa -b 4096
```
for dd25519 keys:
```bash
ssh-keygen -t ed25519 -a 100
```
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 (or
`~/.ssh/id_ed25519.pub` and `~/.ssh/id_ed25519` if you chose ed25519 type)
1. `cat ~/.ssh/id_rsa.pub` (or `cat ~/.ssh/id_ed25519.pub` for ed25519)
1. copy the output of the last command and paste it in the sshkey field on the
signup form (or email it to [~root](mailto:root@tilde.club) if you already have an account)
#### using your keypair
once an admin approves your signup, you can join the tilde.club
1. open terminal (it's in `/Applications/Utilities`)
1. `ssh` to tilde.club:
```bash
ssh username@tilde.club
```
where username is your username (~benharri would use `ssh benharri@tilde.club`)
1. profit???
---
### windows
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)
- [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
for rsa keys:
```bash
ssh-keygen -t rsa -b 4096
```
for ed25519 keys:
```bash
ssh-keygen -t ed25519 -a 100
```
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 (or
`~/.ssh/id_ed25519.pub` and `~/.ssh/id_ed25519` if you chose ed25519 type)
1. `cat ~/.ssh/id_rsa.pub` (or `cat ~/.ssh/id_ed25519.pub` for ed25519)
1. copy the output of the last command and paste it in the sshkey field on the
signup form (or email it to [~root](mailto:root@tilde.club) if you already have an account)
#### using your keypair
once an admin approves your signup, you can join the tilde.club
1. open terminal (it's in `/Applications/Utilities`)
1. `ssh` to tilde.club:
```bash
ssh username@tilde.club
```
where username is your username (~benharri would use `ssh benharri@tilde.club`)
1. profit???
---
### linux
there are a lot of linux distros, but `ssh` and `ssh-keygen` should be available
in almost all cases. if they're not, look up how to install ssh for your distro.
#### generating your keypair
1. make sure you have a `~/.ssh` directory
```bash
mkdir -m 700 ~/.ssh
```
1. create your keys
for rsa keys:
```bash
ssh-keygen -t rsa -b 4096
```
for ed25519 keys:
```bash
ssh-keygen -t ed25519 -a 100
```
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 (or
`~/.ssh/id_ed25519.pub` and `~/.ssh/id_ed25519` if you chose ed25519 type)
1. `cat ~/.ssh/id_rsa.pub` (or `cat ~/.ssh/id_ed25519.pub` for ed25519)
1. copy the output of the last command and paste it in the sshkey field on the
signup form (or email it to [root@tilde.club](mailto:root@tilde.club) if you already have an account)
#### using your keypair
once an admin approves your signup, you can join the tilde.club
1. open a terminal (this depends on your distro)
1. `ssh` to tilde.club:
```bash
ssh username@tilde.club
```
where username is your username (~benharri would use `ssh benharri@tilde.club`)
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).

221
wiki/ssh.html Normal file
View File

@ -0,0 +1,221 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="author" content="benharri" />
<title>ssh</title>
<link rel="stylesheet" href="/style.css">
<style type="text/css">
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
</style>
<style type="text/css">
a.sourceLine { display: inline-block; line-height: 1.25; }
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
a.sourceLine:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode { white-space: pre; position: relative; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
code.sourceCode { white-space: pre-wrap; }
a.sourceLine { text-indent: -1em; padding-left: 1em; }
}
pre.numberSource a.sourceLine
{ position: relative; left: -4em; }
pre.numberSource a.sourceLine::before
{ content: attr(title);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; pointer-events: all; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
a.sourceLine::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<a href="/wiki/">&lt; back to wiki home</a>
<header>
<h1 class="title">ssh</h1>
<p>authors:</p>
<p class="author"><a href="/~benharri/">~benharri</a></p>
</header>
<p><em>or, how to tell other computers to do cool things</em></p>
<hr />
<blockquote>
<p>all users are required to use an ssh keypair for login, or will be required to proceed with manual account recovery</p>
</blockquote>
<h2 id="tilde.club-details">tilde.club details</h2>
<p>for example, to connect to tilde.club, you can do:</p>
<pre><code>ssh user@tilde.club
mosh user@tilde.club</code></pre>
<hr />
<h2 id="intro">intro</h2>
<p>** if you just want to get right to a tutorial you can <a href="#how-to-make-an-ssh-key">skip over this background info</a>**</p>
<p>while <a href="https://tilde.club">tilde.club</a> is accessible on the web and features lovely web pages written by its users, most interaction with tilde.club takes place <strong>inside the machine</strong> that runs tilde.club as opposed to via web forms that have an effect from <strong>outside</strong> tilde.clubs computer.</p>
<p>this is what sets tilde.club 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.clubs computer.</p>
<p>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.</p>
<p>for a long time, people used a tool called <a href="https://en.wikipedia.org/wiki/telnet"><code>telnet</code></a> to connect to other computers. these days we use a tool called <strong>ssh</strong>.</p>
<p><code>ssh</code> 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 <em>shell</em> part refers to the fact that its a text-based tool; we use the word shell to refer to a text-based interface that you give commands to. the <em>secure</em> part refers to the fact that, when youre using ssh, no one can spy on your connection to another computer (unlike the old <code>telnet</code> command).</p>
<p><strong>why bother with all of this?</strong> 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).</p>
<hr />
<h2 id="how-to-make-an-ssh-key">how to make an ssh key</h2>
<p>SSH supports a handful of types of cryptographic keys. The most used are <a href="%3Chttps://en.wikipedia.org/wiki/RSA_(cryptosystem)%3E">RSA</a> and the more modern <a href="https://en.wikipedia.org/wiki/EdDSA#Ed25519">Ed25519</a>.</p>
<p>RSA is the de-facto standard and is supported everywhere (just choose a big enough key like 4096 bits to be secure). Ed25519 is designed to be faster and smaller withouth sacrificing security, so is best suited for embedded devices or machines with low resources. Its supported on tilde (and really on any modern system) but you may find older systems which do not support it.</p>
<p>Below youll find instructions to generate either type (or both if you want).</p>
<p>Keep in mind that these instructions leave your private keys unencrypted in your local hard disk. So keep them private; never share them. A good solution is to provide a password for them at creation time, but this implies entering a password any time you used them (impractical) or use something like <a href="https://man.openbsd.org/ssh-agent.1">ssh-agent</a> (a bit more complex)</p>
<p>pick your fighter: [<a href="#mac">mac</a>] | [<a href="#windows">windows</a>] | [<a href="#linux">linux</a>]</p>
<hr />
<h3 id="mac">mac</h3>
<h4 id="generating-your-keypair">generating your keypair</h4>
<ol type="1">
<li><p>open terminal (its in <code>/Applications/Utilities</code>)</p></li>
<li><p>create your .ssh directory:</p></li>
</ol>
<div class="sourceCode" id="cb2"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb2-1" title="1"><span class="fu">mkdir</span> -m 700 ~/.ssh</a></code></pre></div>
<ol type="1">
<li>create your keys:</li>
</ol>
<p>for rsa keys:</p>
<div class="sourceCode" id="cb3"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb3-1" title="1"><span class="fu">ssh-keygen</span> -t rsa -b 4096</a></code></pre></div>
<p>for dd25519 keys:</p>
<div class="sourceCode" id="cb4"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb4-1" title="1"><span class="fu">ssh-keygen</span> -t ed25519 -a 100</a></code></pre></div>
<ol type="1">
<li><p>if you press enter to accept the defaults, your public and private key will be located at <code>~/.ssh/id_rsa.pub</code> and <code>~/.ssh/id_rsa</code> respectively (or <code>~/.ssh/id_ed25519.pub</code> and <code>~/.ssh/id_ed25519</code> if you chose ed25519 type)</p></li>
<li><p><code>cat ~/.ssh/id_rsa.pub</code> (or <code>cat ~/.ssh/id_ed25519.pub</code> for ed25519)</p></li>
<li><p>copy the output of the last command and paste it in the sshkey field on the signup form (or email it to <a href="mailto:root@tilde.club">~root</a> if you already have an account)</p></li>
</ol>
<h4 id="using-your-keypair">using your keypair</h4>
<p>once an admin approves your signup, you can join the tilde.club</p>
<ol type="1">
<li><p>open terminal (its in <code>/Applications/Utilities</code>)</p></li>
<li><p><code>ssh</code> to tilde.club:</p></li>
</ol>
<div class="sourceCode" id="cb5"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb5-1" title="1"><span class="fu">ssh</span> username@tilde.club</a></code></pre></div>
<p>where username is your username (~benharri would use <code>ssh benharri@tilde.club</code>)</p>
<ol type="1">
<li>profit???</li>
</ol>
<hr />
<h3 id="windows">windows</h3>
<p>there are a couple options for using ssh on windows these days. i like to use <a href="https://git-scm.com">git bash</a>.</p>
<h4 id="generating-your-keypair-1">generating your keypair</h4>
<p>choose from any of the following options:</p>
<ul>
<li><a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10">windows subsystem for linux</a></li>
<li><a href="http://www.msys2.org/">msys2</a></li>
<li><a href="https://git-scm.com">git bash</a></li>
</ul>
<ol type="1">
<li><p>open your new shell</p></li>
<li><p>create your .ssh directory</p></li>
</ol>
<div class="sourceCode" id="cb6"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb6-1" title="1"><span class="fu">mkdir</span> .ssh</a></code></pre></div>
<ol type="1">
<li>create your keypair</li>
</ol>
<p>for rsa keys:</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb7-1" title="1"><span class="fu">ssh-keygen</span> -t rsa -b 4096</a></code></pre></div>
<p>for ed25519 keys:</p>
<div class="sourceCode" id="cb8"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb8-1" title="1"><span class="fu">ssh-keygen</span> -t ed25519 -a 100</a></code></pre></div>
<ol type="1">
<li><p>if you press enter to accept the defaults, your public and private key will be located at <code>~/.ssh/id_rsa.pub</code> and <code>~/.ssh/id_rsa</code> respectively (or <code>~/.ssh/id_ed25519.pub</code> and <code>~/.ssh/id_ed25519</code> if you chose ed25519 type)</p></li>
<li><p><code>cat ~/.ssh/id_rsa.pub</code> (or <code>cat ~/.ssh/id_ed25519.pub</code> for ed25519)</p></li>
<li><p>copy the output of the last command and paste it in the sshkey field on the signup form (or email it to <a href="mailto:root@tilde.club">~root</a> if you already have an account)</p></li>
</ol>
<h4 id="using-your-keypair-1">using your keypair</h4>
<p>once an admin approves your signup, you can join the tilde.club</p>
<ol type="1">
<li><p>open terminal (its in <code>/Applications/Utilities</code>)</p></li>
<li><p><code>ssh</code> to tilde.club:</p></li>
</ol>
<div class="sourceCode" id="cb9"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb9-1" title="1"><span class="fu">ssh</span> username@tilde.club</a></code></pre></div>
<p>where username is your username (~benharri would use <code>ssh benharri@tilde.club</code>)</p>
<ol type="1">
<li>profit???</li>
</ol>
<hr />
<h3 id="linux">linux</h3>
<p>there are a lot of linux distros, but <code>ssh</code> and <code>ssh-keygen</code> should be available in almost all cases. if theyre not, look up how to install ssh for your distro.</p>
<h4 id="generating-your-keypair-2">generating your keypair</h4>
<ol type="1">
<li>make sure you have a <code>~/.ssh</code> directory</li>
</ol>
<div class="sourceCode" id="cb10"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb10-1" title="1"><span class="fu">mkdir</span> -m 700 ~/.ssh</a></code></pre></div>
<ol type="1">
<li>create your keys</li>
</ol>
<p>for rsa keys:</p>
<div class="sourceCode" id="cb11"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb11-1" title="1"><span class="fu">ssh-keygen</span> -t rsa -b 4096</a></code></pre></div>
<p>for ed25519 keys:</p>
<div class="sourceCode" id="cb12"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb12-1" title="1"><span class="fu">ssh-keygen</span> -t ed25519 -a 100</a></code></pre></div>
<ol type="1">
<li><p>if you press enter to accept the defaults, your public and private key will be located at <code>~/.ssh/id_rsa.pub</code> and <code>~/.ssh/id_rsa</code> respectively (or <code>~/.ssh/id_ed25519.pub</code> and <code>~/.ssh/id_ed25519</code> if you chose ed25519 type)</p></li>
<li><p><code>cat ~/.ssh/id_rsa.pub</code> (or <code>cat ~/.ssh/id_ed25519.pub</code> for ed25519)</p></li>
<li><p>copy the output of the last command and paste it in the sshkey field on the signup form (or email it to <a href="mailto:root@tilde.club">root@tilde.club</a> if you already have an account)</p></li>
</ol>
<h4 id="using-your-keypair-2">using your keypair</h4>
<p>once an admin approves your signup, you can join the tilde.club</p>
<ol type="1">
<li><p>open a terminal (this depends on your distro)</p></li>
<li><p><code>ssh</code> to tilde.club:</p></li>
</ol>
<div class="sourceCode" id="cb13"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb13-1" title="1"><span class="fu">ssh</span> username@tilde.club</a></code></pre></div>
<p>where username is your username (~benharri would use <code>ssh benharri@tilde.club</code>)</p>
<ol type="1">
<li>profit???</li>
</ol>
<hr />
<p>this tutorial is based on and uses parts of <a href="https://github.com/tildeclub/tilde.club/blob/master/docs/ssh.md">the tilde.club ssh primer</a> and <a href="https://tilde.town/wiki/ssh.html">the tilde.town ssh guide</a>.</p>
</body>
</html>