74 lines
1.6 KiB
TeX
74 lines
1.6 KiB
TeX
\documentclass[12pt,a4paper]{article}
|
|
\usepackage[portuguese]{babel}
|
|
\usepackage[lining]{ebgaramond}
|
|
\usepackage{listings}
|
|
|
|
% \usepa
|
|
|
|
\lstdefinestyle{mystyle}{
|
|
basicstyle=\ttfamily\footnotesize,
|
|
breakatwhitespace=false,
|
|
breaklines=true,
|
|
captionpos=b,
|
|
keepspaces=true,
|
|
numbers=left,
|
|
numbersep=5pt,
|
|
showspaces=false,
|
|
showstringspaces=false,
|
|
showtabs=false,
|
|
tabsize=2
|
|
}
|
|
|
|
\lstset{style=mystyle}
|
|
|
|
\setlength{\parindent}{0em}
|
|
\setlength{\parskip}{2ex}
|
|
|
|
\title{Practical Assignment \#2}
|
|
\author{
|
|
João Neto -- 2023234004\\[1em]
|
|
Vasco Alves -- 2022228207
|
|
}
|
|
|
|
\begin{document}
|
|
\maketitle
|
|
\tableofcontents
|
|
\newpage
|
|
|
|
\section{Introduction}
|
|
Introdução!!!!
|
|
|
|
Criar chaves com 2048 bits.
|
|
|
|
\begin{lstlisting}[language=bash]
|
|
\end{lstlisting}
|
|
|
|
Criar chave secreta.
|
|
\begin{lstlisting}[language=bash]
|
|
openssl --genkey secret ta.key
|
|
\end{lstlisting}
|
|
|
|
\section{Configurar TOTP}
|
|
|
|
Foi criado o ficheiro \texttt{totp} com a configuração de autenticação a
|
|
ser utilizada pelo plugin de PAM para o openvpn.
|
|
|
|
\begin{lstlisting}[language=bash]
|
|
plugin /usr/lib64/openvpn/plugins/openvpn-plugin-auth-pam.so openvpn
|
|
\end{lstlisting}
|
|
|
|
\subsection{Aceder ao código}
|
|
Primeiro, na gateway, entramos como o utilizador desejado e obtemos a chave
|
|
do gerador de palavras passes temporarias. Ao inserir a chave no
|
|
\texttt{google authenticator} podemos obter a nossa primeira chave de 6 digitos.
|
|
|
|
\begin{lstlisting}[language=bash]
|
|
su john
|
|
google-authenticator
|
|
\end{lstlisting}
|
|
|
|
\section{Conclusion}
|
|
Conclusão!!!
|
|
|
|
\end{document}
|