Add make_keys script

This commit is contained in:
Simponic 2022-12-21 14:05:10 -07:00
parent 90c62c2fe0
commit b18899ffaf
2 changed files with 10 additions and 3 deletions

View File

@ -1,8 +1,6 @@
defmodule Chessh.Auth.KeyAuthenticator do
alias Chessh.Key
alias Chessh.Repo
alias Chessh.{Key, Repo}
use Sshd.PublicKeyAuthenticator
require Logger
import Ecto.Query
def authenticate(username, public_key) do

9
priv/make_keys.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
mkdir keys
chmod 700 keys
cd keys
ssh-keygen -N "" -b 256 -t ecdsa -f ssh_host_ecdsa_key
ssh-keygen -N "" -b 1024 -t dsa -f ssh_host_dsa_key
ssh-keygen -N "" -b 2048 -t rsa -f ssh_host_rsa_key