1.3 KiB
[Mercredi 25 Février 2026]
génération de clé SSH privée/publique - Certificat pour appli python
demain dockerisation de l'appli avec tout les paramètres
- [Commande du jour]
clé privée clé publique
install openssh-server install locate
maxtries fail2ban #Port #PermitRootLogin prohibit-password
<sudo nano /etc/ssh/sshd_config> (sans les<>)
To disable tunneled clear text passwords, change to "no" here!
PasswordAuthentication no (de base oui commenté) #PermitEmptyPasswords no
#AllowAgentForwarding yes #AllowTcpForwarding yes #GatewayPorts no X11Forwarding no (par défaut oui -> interface graphique) #X11DisplayOffset 10 #X11UseLocalhost yes #PermitTTY yes PrintMotd no #PrintLastLog yes #TCPKeepAlive yes #PermitUserEnvironment no #Compression delayed #ClientAliveInterval 0 #ClientAliveCountMax 3 #UseDNS no #PidFile /run/sshd.pid #MaxStartups 10:30:100
#SSH (-X affiche le display du pc qui recoit la connection) ssh -X !USER@ip.ip.ipp.ip -p mettreportici
openssl req -x509 -newkey rsa:4096
-keyout key.pem
-out cert.pem
-days 365
-nodes
uvicorn app:app --host 0.0.0.0 --port 8000 --ssl-keyfile /home/pierre19/.ssh/key.pem --ssl-certfile /home/pierre19/.ssh/cert.pem
Let's encrypt (certificat de connexion gratuit jusqu'a une quantité de connexion) généralement payant