diff --git a/rendu.tex b/rendu.tex index ad609464ffb21364306be2f3a31d936ed8042be9..0cdfd0d59db5e8b19e1e0a1569a9efad2fa6aa9f 100644 --- a/rendu.tex +++ b/rendu.tex @@ -4,6 +4,9 @@ \usepackage[T1]{fontenc} \usepackage{listings} \usepackage{xcolor} +\usepackage{graphicx} + +\graphicspath{ {./img/} } \definecolor{codegreen}{rgb}{0,0.6,0} \definecolor{codegray}{rgb}{0.5,0.5,0.5} @@ -123,7 +126,7 @@ L'history des utilisateurs sont vides. \subsection*{\#2} -\begin{lstlisting}[language=bash] +\begin{lstlisting} bob@srv:~$ ssh-copy-id alice@192.168.56.3 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/bob/.ssh/id_rsa.pub" alice@192.168.56.3's password: @@ -133,14 +136,14 @@ Number of key(s) added: 1 Après la copie de la clef bob peut se conecter sans le mot de passe de alice. -\begin{lstlisting}[language=bash] +\begin{lstlisting} ssh-agent ssh-add Ces commandes permettent de ne pas taper le mot de passe a chaque connections. \end{lstlisting} -\subsection*{\#3} +\subsection*{\#3.1} -\begin{lstlisting}[language=bash] +\begin{lstlisting} alice@cli:~$ ssh-keyscan 192.168.56.3 > .ssh/known_hosts # 192.168.56.3:22 SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u7 # 192.168.56.3:22 SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u7 @@ -148,9 +151,9 @@ alice@cli:~$ ssh-keyscan 192.168.56.3 > .ssh/known_hosts alice@cli:~$ ssh bob@192.168.56.3 bob@192.168.56.3's password: \end{lstlisting} -\subsection*{\#4} +\subsection*{\#3.2} -\begin{lstlisting}[language=bash] +\begin{lstlisting} ArchNilux% sftp alice@192.168.56.2 alice@192.168.56.2's password: Connected to 192.168.56.2. @@ -165,12 +168,17 @@ sftp> ^D sshfs alice@192.168.56.2:/home tmp \end{lstlisting} Le fichier a bien été modifié sur le home d'alice -\subsection*{\#5} +\subsection*{\#4} +\includegraphics{ssh2.png} +\subsection*{\#6} +Firefox depuis une autre machine avec le x-forwarding + +\includegraphics[width=10cm]{ssh3.png} \section{Git} \subsection*{\#1} -\begin{lstlisting}[language=bash] +\begin{lstlisting} ~/git/vagrantssh $ git init git status vagrant up