klintorg_site/README.org
2022-11-11 08:52:06 +03:00

37 lines
1.1 KiB
Org Mode
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#+TITLE: Install server from scratch (Rocky Linux)
#+SUBTITLE: Quick reference card
#+AUTHOR: Norets Alexey
#+EMAIL: (concat "asnorets" at-sign "gmail.com")
#+DESCRIPTION: Rocky Linux from scratch
#+KEYWORDS: Rocky linux, gunicorn + nginx + flask
#+LANGUAGE: ru
#+OPTIONS: H:4 num:nil toc:2 p:t
* Установка сервера с нуля (gunicorn + nginx + flask) и настройка WireGuard
Создаем сервер. Заходим через SSH -> выходим -> копируем ключи на сервер.
#+begin_src shell
ssh <login>@<ip-address server>
exit
ssh-copy-id <login>@<ip-address server>
#+end_src
Теперь можем заходить по ключу (~/.ssh)
На сервере настраиваем SSH (запрет авторизации по паролю, запрет root по ssh)
#+begin_src shell
sudo vim /etc/ssh/sshd_config
#+end_src
Добавляем или изменяем строки:
#+begin_src conf
AllowUsers <login>
PermitRootLogin no
PasswordAuthentication no
#+end_src
#+begin_src shell
sudo systemctl restart sshd
#+end_src