From ac5ef5ff19e837baae707e4554914129c023a8c3 Mon Sep 17 00:00:00 2001 From: Svenja Mehringer Date: Mon, 4 Mar 2024 11:32:46 +0100 Subject: [PATCH 1/4] [MISC] Improve clarity of instructions for prefix. --- create_scavenger_hunt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_scavenger_hunt.sh b/create_scavenger_hunt.sh index af2ade6..587a921 100755 --- a/create_scavenger_hunt.sh +++ b/create_scavenger_hunt.sh @@ -47,7 +47,7 @@ curl -sS --fail https://lipsum.com/feed/json -d "amount=150" -d "what=paras" -d | fold -s -w80 \ | awk -v new_word=" password:${PASSWORD5} " 'NR==512 {gsub(substr($0, 10, 16), new_word)} {print}' \ > ${PATH_LEVEL_4}/password.txt -echo "The password is somewhere in the file. It is prefixed "password:"." > ${PATH_LEVEL_4}/README.txt +echo "The password is somewhere in the file. It is prefixed 'password:'" > ${PATH_LEVEL_4}/README.txt echo "" >> ${PATH_LEVEL_4}/README.txt echo "You may use one, some or all of these tools:" >> ${PATH_LEVEL_4}/README.txt echo "" >> ${PATH_LEVEL_4}/README.txt From 5b8bb3657b43a98ba06826f9a5c42e4f5794c629 Mon Sep 17 00:00:00 2001 From: Svenja Mehringer Date: Mon, 4 Mar 2024 15:16:03 +0100 Subject: [PATCH 2/4] [FEATURE] Add ssh.tex --- ssh.tex | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 ssh.tex diff --git a/ssh.tex b/ssh.tex new file mode 100644 index 0000000..aab60aa --- /dev/null +++ b/ssh.tex @@ -0,0 +1,122 @@ +\documentclass{article} +\usepackage[utf8]{inputenc} +\usepackage[margin=1in]{geometry} % Reduced margin + +\title{Getting Started with SSH} +\date{} + +\setlength{\parindent}{0pt} + +\begin{document} + + \maketitle + + \section{Introduction} + SSH (Secure Shell) is a cryptographic network protocol for operating network services securely over an unsecured network. It provides a secure channel over an unsecured network by encrypting the communication between the client and server. + + \section{Zedat Account} + + You need a Zedat account. To make sure it is registered/activated, please login once into \verb|https://portal.mi.fu-berlin.de|. You may need to wait up to an hour. + + \section{Installing SSH Client} + + \begin{description} + \item[Linux:] ssh should be installed. Otherwise do: \begin{verbatim} + sudo apt-get install openssh-client + \end{verbatim} + \item[Mac:] ssh should be installed + \item[Windows: ] Install WSL (WIndows Subsystem for Linux). ssh should then be available + \end{description} + + \section{Set up you ssh config file} + + In your terminal, type: + \begin{verbatim} + nano ~/.ssh/config + \end{verbatim} + + This will open a file. Now copy the following into this file and change \verb|| with you Zedat username. + + \begin{verbatim} +Host andorra +Hostname andorra.imp.fu-berlin.de +User + +# The following proxy jumps over andorra and letts you access +# all compute servers and cudo servers +# e.g. ssh compute01 +Host compute?? cuda?? +HostName %h.imp.fu-berlin.de +ProxyJump andorra +User + + \end{verbatim} + + Save and Exit \verb|nano|. + + \section{Connect to the FU server} + + Now that you have your config set up. Type: + + \begin{verbatim} + ssh compute01 + \end{verbatim} + + If you're connecting for the first time, you may see a message asking you to verify the authenticity of the host. Type \texttt{yes} to continue connecting. + + You are also asked for your Zedat password. Maybe even multiple times. + + \section{Connect to the servers with an ssh key pair} + + With the above there are two issues: + + \begin{enumerate} + \item You always have to type in your password (thats a waste of time) + \item You \textbf{cannot login if you are not connected to eduroam}. + \end{enumerate} + + To overcome these issues, we need to generate a ssh key pair. + + \subsection{Check if you already have an ssh key pair} + + Type the following in your terminal: + + \begin{verbatim} + ls ~/.ssh + \end{verbatim} + + It should print at least the config file we created. And might show this: + + \begin{verbatim} + config id_rsa id_rsa.pub + \end{verbatim} + + If you see a file that ends with \verb|.pub| you already have and ssh and you can reuse it. + + \textbf{If you already have an ssh key SKIP 6.2!} + + \subsection{Create an ssh key} + + Type into you terminal: + + \begin{verbatim} + ssh-keygen -t rsa -b 4096 -C "your_email@example.com" + \end{verbatim} + + If you are asked for a pass phrase, just press Enter (we recommend not setting a password). + + \subsection{Copy the ssh-key to the server} + + Type into you terminal: + + \begin{verbatim} + ssh-copy-id andorra + \end{verbatim} + + Type in your zedat password if asked for. + + \section{Done} + + You should now be able to login to the servers from everywhere without adding your password everytime. +\end{document} + From dc0906e9b22a6892be68df931c65d16149872987 Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Mon, 4 Mar 2024 21:35:12 +0100 Subject: [PATCH 3/4] review --- ssh.tex | 207 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 106 insertions(+), 101 deletions(-) diff --git a/ssh.tex b/ssh.tex index aab60aa..f389588 100644 --- a/ssh.tex +++ b/ssh.tex @@ -1,6 +1,9 @@ \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[margin=1in]{geometry} % Reduced margin +% lmodern + fontenc make ~ align to the middle +\usepackage{lmodern} +\usepackage[T1]{fontenc} \title{Getting Started with SSH} \date{} @@ -8,115 +11,117 @@ \setlength{\parindent}{0pt} \begin{document} - - \maketitle - - \section{Introduction} - SSH (Secure Shell) is a cryptographic network protocol for operating network services securely over an unsecured network. It provides a secure channel over an unsecured network by encrypting the communication between the client and server. - - \section{Zedat Account} - - You need a Zedat account. To make sure it is registered/activated, please login once into \verb|https://portal.mi.fu-berlin.de|. You may need to wait up to an hour. - - \section{Installing SSH Client} - - \begin{description} - \item[Linux:] ssh should be installed. Otherwise do: \begin{verbatim} - sudo apt-get install openssh-client - \end{verbatim} - \item[Mac:] ssh should be installed - \item[Windows: ] Install WSL (WIndows Subsystem for Linux). ssh should then be available - \end{description} - - \section{Set up you ssh config file} - - In your terminal, type: - \begin{verbatim} - nano ~/.ssh/config - \end{verbatim} - - This will open a file. Now copy the following into this file and change \verb|| with you Zedat username. - - \begin{verbatim} + +\maketitle + +\section{Introduction} +SSH (Secure Shell) is a cryptographic network protocol for operating network services securely over an unsecured network. It provides a secure channel over an unsecured network by encrypting the communication between the client and server. + +\section{ZEDAT Account} + +You need a ZEDAT account that is registered with the Fachbereich. To make sure your account is activated, please log in into \verb|https://portal.mi.fu-berlin.de| once. You may need to wait up to an hour. + +\section{Installing SSH Client} + +\begin{description} + \item[Linux:] ssh should be installed. If not, run: \verb|sudo apt install openssh-client| + \item[Mac:] ssh should be installed. + \item[Windows:] Install WSL (Windows Subsystem for Linux). ssh should then be available in WSL. +\end{description} + +\section{Setting Up Your ssh Config} + +In your terminal, type: +\begin{verbatim} + mkdir -p ~/.ssh + touch ~/.ssh/config + chmod 600 ~/.ssh/config + nano ~/.ssh/config +\end{verbatim} + +This will open a file. Now copy the following into this file and replace \verb|| with your ZEDAT username. + +\begin{verbatim} Host andorra Hostname andorra.imp.fu-berlin.de User -# The following proxy jumps over andorra and letts you access -# all compute servers and cudo servers -# e.g. ssh compute01 +# The following uses andorra as a proxy to let you access +# all compute servers and cuda servers. +# For example, `ssh compute01` Host compute?? cuda?? HostName %h.imp.fu-berlin.de ProxyJump andorra User +\end{verbatim} + +Save and exit \verb|nano| (\texttt{}, \texttt{}, \texttt{}). + +\section{Connecting to the FU Server} + +After setting up your config, type: + +\begin{verbatim} + ssh compute01 +\end{verbatim} + +If you are connecting for the first time, you will see a message asking you whether you trust the server. Type \texttt{yes} and press \texttt{} to continue connecting. + +You are also asked for your ZEDAT password. Maybe even multiple times. + +\section{Connecting to the Servers with an ssh Key Pair} + +There are still two issues left to solve: + +\begin{enumerate} + \item You always have to type in your password (that's a waste of time) + \item \textbf{You cannot log in if you are not connected to eduroam}. +\end{enumerate} + +To overcome these issues, we need to generate an ssh key pair. + +\subsection{Checking whether you already have an ssh key pair} + +Type the following in your terminal: + +\begin{verbatim} + ls ~/.ssh +\end{verbatim} + +It should print at least the config file we created, and might show this: + +\begin{verbatim} + config id_rsa id_rsa.pub +\end{verbatim} + +If you see a file that ends with \verb|.pub|, you already have an ssh key that you can reuse. + +\textbf{If you already have an ssh key, SKIP 6.2!} + +\subsection{Creating an ssh key} + +Type into your terminal: + +\begin{verbatim} + ssh-keygen -t rsa -b 4096 -C "your_email@example.com" +\end{verbatim} + +The string after \texttt{-C} is a comment for your key that you can freely choose. + +If you are asked for a passphrase, just press \texttt{}. Otherwise, you will have to enter your ssh key password each time you want to use it. + +\subsection{Copy the ssh-key to the server} + +Type into your terminal: + +\begin{verbatim} + ssh-copy-id andorra +\end{verbatim} + +Type in your ZEDAT password if requested to do so. + +\section{Done} - \end{verbatim} - - Save and Exit \verb|nano|. - - \section{Connect to the FU server} - - Now that you have your config set up. Type: - - \begin{verbatim} - ssh compute01 - \end{verbatim} - - If you're connecting for the first time, you may see a message asking you to verify the authenticity of the host. Type \texttt{yes} to continue connecting. - - You are also asked for your Zedat password. Maybe even multiple times. - - \section{Connect to the servers with an ssh key pair} - - With the above there are two issues: - - \begin{enumerate} - \item You always have to type in your password (thats a waste of time) - \item You \textbf{cannot login if you are not connected to eduroam}. - \end{enumerate} - - To overcome these issues, we need to generate a ssh key pair. - - \subsection{Check if you already have an ssh key pair} - - Type the following in your terminal: - - \begin{verbatim} - ls ~/.ssh - \end{verbatim} - - It should print at least the config file we created. And might show this: - - \begin{verbatim} - config id_rsa id_rsa.pub - \end{verbatim} - - If you see a file that ends with \verb|.pub| you already have and ssh and you can reuse it. - - \textbf{If you already have an ssh key SKIP 6.2!} - - \subsection{Create an ssh key} - - Type into you terminal: - - \begin{verbatim} - ssh-keygen -t rsa -b 4096 -C "your_email@example.com" - \end{verbatim} - - If you are asked for a pass phrase, just press Enter (we recommend not setting a password). - - \subsection{Copy the ssh-key to the server} - - Type into you terminal: - - \begin{verbatim} - ssh-copy-id andorra - \end{verbatim} - - Type in your zedat password if asked for. - - \section{Done} - - You should now be able to login to the servers from everywhere without adding your password everytime. +You should now be able to log in to the servers from everywhere without entering your password every time. \end{document} From ec741440a7c648cd7ba9c97a7d6bb0cce5be088a Mon Sep 17 00:00:00 2001 From: Enrico Seiler Date: Mon, 4 Mar 2024 21:37:22 +0100 Subject: [PATCH 4/4] license --- ssh.tex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ssh.tex b/ssh.tex index f389588..519a5c5 100644 --- a/ssh.tex +++ b/ssh.tex @@ -1,3 +1,7 @@ +% SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin +% SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik +% SPDX-License-Identifier: CC-BY-4.0 + \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[margin=1in]{geometry} % Reduced margin