\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{cfmccool} \pdfinfo{ /Title (intro-to-system-administration-mccool.pdf) /Creator (Cheatography) /Author (cfmccool) /Subject (Intro To System Administration - McCool Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{0DA38A} \definecolor{LightBackground}{HTML}{EFF9F7} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Intro To System Administration - McCool Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{cfmccool} via \textcolor{DarkBackground}{\uline{cheatography.com/89679/cs/20414/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}cfmccool \\ \uline{cheatography.com/cfmccool} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 24th October, 2019.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Popular Commands}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{ps - shows the status of running processes, supports more than 80 command-line options on Linux systems. \newline \newline man - traditional "on-line" documentation \newline \newline pwd - print working directory \newline \newline cd - move to another directory \newline \newline mkdir - to make a directory \newline \newline rmdir - remove to directory} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Manuel Pages}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{To find out about a command: \newline man {\emph{command}} \newline \newline Manual pages are divided into different sections depending on their purpose. User commands are in section 1, Unix system calls in section 2, and so on. 1, 5 (file formats), and 8 (system administration commands).} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Transport Layer Security}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Uses public key cryptography and PKI to secure messages between nodes on a network. TLS runs as a separate layer that wraps TCP connections. Once a client and server have established a TLS connection, the contents of the exchange, including the URL and all headers, are protected by encryption.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Even More Important Directories}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{/usr/local \newline Programs and datafiles that have been added locally by the system administrator. \newline \newline /etc/skel \newline Sample startup files you can place in home directories for new users \newline \newline /dev \newline This directory contains the so-called device files, the interface between the filesystem and the hardware \newline \newline /proc \newline The interface between the filesystem and the running processes, the CPU, and memory \newline \newline /opt \newline Directory is often used for larger software packages} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{More Important Directories}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{/var/spool \newline Temporary storage for files being printed, sent by UUCP, and so on. \newline \newline /usr/lib \newline Standard libraries, such as libc.a. \newline \newline /usr/lib/X11 \newline The X Window System distribution. Contains the libraries used by X clients, as well as fonts, sample resources files, and other important parts of the X package. \newline \newline /usr/include \newline Standard location of include files used in C programs \newline \newline /usr/src \newline Location of sources to programs built on the system.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Important Directories}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{/bin \newline The most essential Unix commands, such as ls. \newline \newline /usr/bin \newline Other commands. \newline \newline /sbin \newline Very common commands used by the superuser for system administration. \newline \newline /usr/sbin \newline Commands used less often by the superuser for system administration. \newline \newline /boot \newline Location where the kernel and other files used during booting are sometimes stored. \newline \newline /etc \newline Files used by subsystems such as networking, NFS, and mail. \newline \newline /var \newline Administrative files, such as log files, used by various utilities.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Boot Process Tasks}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Tasks: \newline Finding, loading, and running bootstrapping code \newline \newline Finding, loading, and running the OS kernel \newline \newline Running startup scripts and system daemons \newline \newline Maintaining process hygiene and managing system state transitions} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Diagram of Processes Forked From Shell}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/cfmccool_1571870221_Screen Shot 2019-10-23 at 6.35.52 PM.png}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Fix Key Commands}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{stty function key \newline \newline Function is what you want to do: \newline erase, kill, intr, susp \newline \newline Key is the key that you press. Put (\textasciicircum{}) in front of key i.e \textasciicircum{}C \newline \newline To generate list of current terminal settings: \newline stty a \newline \newline Command to bring shell to a reason and making it operate as expected if it doesn't: \newline stty sane} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Useful Keys}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Ctrl-U : Delete the line from the cursor to the beginning of the line. \newline \newline Ctrl-C : Aborts execution. \newline \newline Ctrl-Z : Suspends execution. \newline \newline Ctrl-S : Stops the terminal output until you press Ctrl-Q.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{What the test command can do}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Check whether a file exists \newline % Row Count 1 (+ 1) Check whether a directory exists \newline % Row Count 2 (+ 1) Check whether a variable is not empty \newline % Row Count 3 (+ 1) Check whether two variables have the same values \newline % Row Count 4 (+ 1) Check whether FILE1 is older than FILE2 \newline % Row Count 5 (+ 1) Check whether INTEGER1 is greater than INTEGER2% Row Count 6 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Shells on Linux}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{bash - Bourne Again shell. The most commonly used shell on Linux. Command-line editing, history substitution. \newline \newline csh - Different interface for programming. No command-line editing, history substitution. \newline \newline ksh - Korn shell. Command-line editing. \newline \newline sh - Bourne shell. The original shell. No command-line editing. \newline \newline tcsh - Enhanced C shell. Command-line editing. \newline \newline zsh - Z shell. The newest of the shells. Command-line editing. Has very powerful completion features.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Linux \& Unix Boot Process}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{p{5.377cm}}{\vspace{1px}\centerline{\includegraphics[width=5.1cm]{/web/www.cheatography.com/public/uploads/cfmccool_1568861815_Screen Shot 2019-09-18 at 10.56.23 PM.png}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{More Basic Security Measures}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Root Kits - Programs and patches that hide important system information such as process, disk, or network activity. \newline \newline Packet Filtering - Passes only traffic for services that you specifically want to offer from that system. \newline \newline Passwords and Multifactor Authentication \newline \newline Vigilance \newline \newline Application penetration testing} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Copying the Current Shell}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{ps -f \newline % Row Count 1 (+ 1) The current shell is copied including the environment variables.% Row Count 3 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{OpenSSH Essentials}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Commands: \newline % Row Count 1 (+ 1) ssh : the client \newline % Row Count 2 (+ 1) sshd : the server daemon \newline % Row Count 3 (+ 1) ssh-keygen : for generating public/private key pairs \newline % Row Count 5 (+ 2) ssh-add and ssh-agent : tools for managing authentication keys \newline % Row Count 7 (+ 2) ssh-keyscan : for retrieving public keys from servers \newline % Row Count 9 (+ 2) sftp-server : the server process for file transfer over SFTP \newline % Row Count 11 (+ 2) sftp and scp : file transfer client utilities% Row Count 12 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{To Create A Temp File w/ Random Name}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{mktemp \newline % Row Count 1 (+ 1) This command is used to create a temporary file with a random name, which could be useful is we needed to have a place on disk for some temporary data. \newline % Row Count 5 (+ 4) With the -d flag to mktemp, we would create a temporary directory with a random name. Because the random name is sufficiently long and we should always have write permissions in /tmp/, we would expect the mktemp command to almost always succeed and thus return an exit status of 0.% Row Count 11 (+ 6) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Security Power Tools}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Nmap - Network Port Scanner \newline \newline Nessus - Next generation network scanner \newline \newline Metasploit - Penetration testing software \newline \newline Lynis - On-box security auditing \newline \newline John the Ripper - Finder of insecure passwords \newline \newline Bro - The programmable network intrusion detection system \newline \newline Snort - the popular network intrusion detection system \newline \newline OSSEC - Host-based intrusion detection \newline \newline Fail2Ban - Brute-Force attack response system} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Remote Logins}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{ssh -1 accountname systemname \newline \newline -1 specifies the account on the remote system \newline \newline Another syntax with identical effects is: \newline ssh accountname@systemname \newline \newline To suspend remote login: \newline \textasciitilde{} followed by Ctrl-Z} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{How Security Is Compromised}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Social Engineering \newline \newline Software Vulnerabilities \newline \newline Distributed Denial-of-Service \newline \newline Insider Abuse \newline \newline Network, system, or application configuration errors} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Elements of Security}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Confidentiality - Privacy of data \newline \newline Integrity - Authenticity of Information \newline \newline Availability - Must be accessible to authorized to users when they need it} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Basic Security Measures}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Software Updates \newline \newline Unnecessary Services - Disabling unnecessary services. \newline \newline Remote Event Logging \newline \newline Backups - Regular, tested system backups are an essential part of any site security plan. Protect your backups by limiting (and monitoring) access and by encrypting backup files. \newline \newline Viruses and Worms} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{To Copy Stuff Over SSH}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{To copy files in the SSH suite: \newline scp \newline \newline Copies a file from your local system to remote system: \newline scp filepath accountname@systemname: DO NOT FORGET COLON \newline \newline Copies a file from the remote system to your own: \newline scp \seqsplit{accountname@systemname:filepath} \newline \newline To copy a directory: \newline scp -r \seqsplit{accountname@systemname:directoryname} relative path.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Viewing Files}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{xemacs - editor \newline \newline cat - used to scan a file, rather than edit it. \newline \newline vi - text editor \newline \newline more - prints a screenful at a time and waits for you to press the spacebar before printing more. Can search for a string in the file: press the slash key (/), type the string, and press Return. \newline \newline less - variation of more \newline \newline nano - simple and low-impact starter editor} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Linux login}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Password: \newline \# - means you are at root level \newline \$ - means you are at the user level \newline To set a password use the "passwd" command.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Startup Files}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{.bashrc - Startup file \newline \newline .bash\_profile - Runs only when you log in \newline \newline .zshrc - .bashrc but for zsh \newline \newline .zprofile - .bash\_profile, but for zsh \newline \newline .cshrc - For the C shell or tcsh \newline \newline .login - .bash\_profile for the C shell or tcsh. \newline \newline .emacs - For Emacs editor \newline \newline .exrc - For vi editor \newline \newline .newsrc - For news readers \newline \newline .xinitrc - For X Window System \newline \newline .kde/share/config - Directory with configuration files for the K Desktop Environment \newline \newline .gnome - Directory with configuration files for the GNOME} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Filename Expansion}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{ls - lists files. \newline \newline ls text?text - lists files containing digits in a position if the difference in file names is just a digit. \newline \newline ls text{[}13{]}text - lists files with the digits 1 and 3 in that position. \newline \newline ls text{[}1-3{]}text - lists all files from 1-3 inclusive in that position. Also works with alphabetical characters {[}a-zA-Z{]} \newline \newline ls text*text - lists all files that match the structure including a numbers and full words between the text.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Common Security Flavors for NFS Protocol}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{AUTH\_NONE - no authentication \newline % Row Count 1 (+ 1) AUTH\_SYS - UNIX-style user and group access control \newline % Row Count 3 (+ 2) RPCSEC\_GSS - a stronger flavor that enables flexible security schemes% Row Count 5 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{NFS Drawbacks}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{- NFS has no built-in provisions for synchronizing with backup servers. \newline % Row Count 2 (+ 2) - The sudden disappearance of an NFS server from the network can result in clients holding stale file handles that can be cleaned up only with a reboot. \newline % Row Count 6 (+ 4) - Strong security is possible but is overly complex.% Row Count 8 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{NFS (Network File System)}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{The NFS protocol has been refined to increase platform independence, to improve performance over wide area networks such as the Internet, and to add strong, modular security features.% Row Count 4 (+ 4) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Cryptographic Hash Functions}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Properties: \newline Entanglement: every bit of the hash value depends on every bit of the input data. On average, changing one bit of input should cause 50\% of the hash bits to change. \newline \newline Pseudo-randomness: hash values should be indistinguishable from random data. \newline \newline Non reversibility: given a hash value, it should be infeasible to discover another input that generates the same hash value.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Public Key Infrastructure}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{A network of entities who trust each other to varying degrees. By following indirect chains of trust outside your personal network, you can establish that a public key is trustworthy with a reasonable degree of confidence. \newline The Public Key Infrastructure, used to implement TLS on the web, addresses this problem by trusting a third party known as a Certificate Authority (CA) to vouch for public keys. \newline The CA signs certificates for Alice and Bob's public keys with its own private key.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Public Key Cryptography}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Alice generates a pair of keys. The private key remains a secret, but the public key can be widely known. Bob similarly generates a key pair and publishes his public key. When Alice wants to send Bob a message, she encrypts it with Bob's public key. Bob, who holds the private key, is the only one who can decrypt the message. \newline Alice can also sign the message with her private key. Bob can use Alice's signature and her public key to validate its authenticity. \newline Asymmetric ciphers.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Symmetric Key Cryptography}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Alice and Bob share a secret key that they use to encrypt and decrypt messages. They must find a way to exchange the shared secret privately. Once they both know the key, they can reuse it as long as they wish. \newline Symmetric keys are relatively efficient in terms of CPU usage and the size of the encrypted payloads. \newline The need to distribute the shared key in advance is a serious impediment to many use cases.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Cryptographic Message Properties}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{} \tn % Row Count 0 (+ 0) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Confidentiality - messages are impossible to read for everyone except the intended recipients. \newline \newline Integrity - it is impossible to modify the contents without detection. \newline \newline Non repudiation - the authenticity of the message can be validated.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}