Browse Source

new: doc: add install script of ``st`` to connect to VPS

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
rc1
Valentin Lab 3 years ago
parent
commit
6537181ab5
  1. 35
      README.org

35
README.org

@ -192,6 +192,41 @@ s'occuper de la petite maintenance:
Description des process de gestion d'une installation existante.
** Connection aux serveurs
*** installation commande =st=
Le mieux est d'utiliser la commande =st= que l'on peut installer ainsi
sur un poste linux ayant =apt=:
Se mettre en =root=:
#+begin_src sh
cat <<'EOF' > /usr/local/bin/st
#!/bin/bash
echo "Trying mosh to $1"
TERM=xterm-256color mosh "$1" -- bash -c "tmux attach || { tmux; }"
if [ "$?" == "5" ]; then
echo "Fallback to ssh $1"
ssh "$1" -tM "TERM=xterm-256color tmux attach || TERM=xterm-256color tmux"
fi
EOF
chmod +x /usr/local/bin/st
apt install mosh
#+end_src
*** utilisation de la commande =st=
=st= utilise =ssh= ou =mosh= et se met dans un =tmux= sur la destination.
#+begin_src sh
st root@monvps.fr
#+end_src
On note qu'il faut penser à mettre les clé SSH sur la destination.
** Mise à jour de l'ensemble
Pour mettre à jour un VPS:

Loading…
Cancel
Save