Skip to content
Snippets Groups Projects
Commit ac78b964 authored by RIEHM Clement's avatar RIEHM Clement
Browse files

Completion ssh

parent cf1fbec8
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
\usepackage[T1]{fontenc} \usepackage[T1]{fontenc}
\usepackage{listings} \usepackage{listings}
\usepackage{xcolor} \usepackage{xcolor}
\usepackage{graphicx}
\graphicspath{ {./img/} }
\definecolor{codegreen}{rgb}{0,0.6,0} \definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5} \definecolor{codegray}{rgb}{0.5,0.5,0.5}
...@@ -123,7 +126,7 @@ L'history des utilisateurs sont vides. ...@@ -123,7 +126,7 @@ L'history des utilisateurs sont vides.
\subsection*{\#2} \subsection*{\#2}
\begin{lstlisting}[language=bash] \begin{lstlisting}
bob@srv:~$ ssh-copy-id alice@192.168.56.3 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" /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: alice@192.168.56.3's password:
...@@ -133,14 +136,14 @@ Number of key(s) added: 1 ...@@ -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. 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-agent
ssh-add ssh-add
Ces commandes permettent de ne pas taper le mot de passe a chaque connections. Ces commandes permettent de ne pas taper le mot de passe a chaque connections.
\end{lstlisting} \end{lstlisting}
\subsection*{\#3} \subsection*{\#3.1}
\begin{lstlisting}[language=bash] \begin{lstlisting}
alice@cli:~$ ssh-keyscan 192.168.56.3 > .ssh/known_hosts 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
# 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 ...@@ -148,9 +151,9 @@ alice@cli:~$ ssh-keyscan 192.168.56.3 > .ssh/known_hosts
alice@cli:~$ ssh bob@192.168.56.3 alice@cli:~$ ssh bob@192.168.56.3
bob@192.168.56.3's password: bob@192.168.56.3's password:
\end{lstlisting} \end{lstlisting}
\subsection*{\#4} \subsection*{\#3.2}
\begin{lstlisting}[language=bash] \begin{lstlisting}
ArchNilux% sftp alice@192.168.56.2 ArchNilux% sftp alice@192.168.56.2
alice@192.168.56.2's password: alice@192.168.56.2's password:
Connected to 192.168.56.2. Connected to 192.168.56.2.
...@@ -165,12 +168,17 @@ sftp> ^D ...@@ -165,12 +168,17 @@ sftp> ^D
sshfs alice@192.168.56.2:/home tmp sshfs alice@192.168.56.2:/home tmp
\end{lstlisting} \end{lstlisting}
Le fichier a bien été modifié sur le home d'alice 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} \section{Git}
\subsection*{\#1} \subsection*{\#1}
\begin{lstlisting}[language=bash] \begin{lstlisting}
~/git/vagrantssh $ git init ~/git/vagrantssh $ git init
git status git status
vagrant up vagrant up
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment