Network Monitoring & Management. A few Linux basics

Similar documents
commands exercises Linux System Administration and IP Services AfNOG 2015 Linux Commands # Notes

Contents. Note: pay attention to where you are. Note: Plaintext version. Note: pay attention to where you are... 1 Note: Plaintext version...

User Guide Version 2.0

Introduction to Linux (Part I) BUPT/QMUL 2018/03/14

Using RDP with Azure Linux Virtual Machines

Setting up a Chaincoin Masternode

Using RANCID. Contents. 1 Introduction Goals Notes Install rancid Add alias Configure rancid...

Unix / Linux Overview

Introduction to Linux Environment. Yun-Wen Chen

Introduction to remote command line Linux. Research Computing Team University of Birmingham

SANOG VI IP Services Workshop: FreeBSD Install

Chapter-3. Introduction to Unix: Fundamental Commands

STA 303 / 1002 Using SAS on CQUEST

Introduction: What is Unix?

Linux Systems Administration Getting Started with Linux

An introduction to Linux Part 4

Some Ubuntu Practice...

Windows Subsystem for Linux Guide Documentation

Introduction to Linux. Woo-Yeong Jeong Computer Systems Laboratory Sungkyunkwan University

Computer Systems and Architecture

L.A.M.P. Stack Part I

Intermediate Programming, Spring Misha Kazhdan

Parallel Programming Pre-Assignment. Setting up the Software Environment

Perl and R Scripting for Biologists

Intro to Linux & Command Line

CENG 334 Computer Networks. Laboratory I Linux Tutorial

Lab 2: Linux/Unix shell

More Raspian. An editor Configuration files Shell scripts Shell variables System admin

#Uncomment the second line to enable any form of FTP write command. #write_enable=yes

UoW HPC Quick Start. Information Technology Services University of Wollongong. ( Last updated on October 10, 2011)

Introduction to the UNIX command line

Lab Working with Linux Command Line

Post Ubuntu Install Exercises

An Introduction to Cluster Computing Using Newton

CHE3935. Lecture 1. Introduction to Linux

Linux Survival Guide

Introduction to Linux

Sit with your new teammate

Getting Started With UNIX Lab Exercises

Introduction to Linux

Unix/Linux Basics. Cpt S 223, Fall 2007 Copyright: Washington State University

Linux at the Command Line Don Johnson of BU IS&T

Linux Essentials Objectives Topics:

No Food or Drink in this room. Logon to Windows machine

WELCOME TO SS-E AFNOG NAIROBI, KENYA. Scalable Services English

Physics REU Unix Tutorial

Linux Introduction to Linux

CS370 Operating Systems

CSE 390a Lecture 3. Multi-user systems; remote login; editors; users/groups; permissions

Sysinstall main menu. Move the cursor down by using the DOWN-ARROW and select Standard.

Introduction to Linux. Fundamentals of Computer Science

A Brief Introduction to the Linux Shell for Data Science

EASYLAMP UBUNTU V1.0 DOCUMENT OWNER: OUDHUIS, JONATHAN INGRAM MICRO CLOUD EUROPE

Linux Command Line Primer. By: Scott Marshall

New User Tutorial. OSU High Performance Computing Center

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform

Linux Kung Fu. Ross Ventresca UBNetDef, Fall 2017

We want to install putty, an ssh client on the laptops. In the web browser goto:

Introduction To Linux. Rob Thomas - ACRC

Brief Linux Presentation. July 10th, 2006 Elan Borenstein

Editors in Unix come in two general flavours:

Introduction. File System. Note. Achtung!

The Wonderful World of Services VINCE

Introduction to Linux

Ubuntu Practice and Configuration Post Installation Exercises interlab at AIT Bangkok, Thailand

Using WestGrid from the desktop Oct on Access Grid

Embedded Linux Systems. Bin Li Assistant Professor Dept. of Electrical, Computer and Biomedical Engineering University of Rhode Island

Linux/Cygwin Practice Computer Architecture

DJI FlightHub Enterprise

AMS 200: Working on Linux/Unix Machines

CSE Linux VM. For Microsoft Windows. Based on opensuse Leap 42.2

Users Manual. OP5 System 2.4. OP5 AB. Page 1 of 6

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Installing Altiris Agent on Ubuntu

CSN08101 Digital Forensics. Module Leader: Dr Gordon Russell Lecturers: Robert Ludwiniak

Week 5 Lesson 5 02/28/18

Using LINUX a BCMB/CHEM 8190 Tutorial Updated (1/17/12)

Ticketing Service 1 Request Tracker (RT) Installation and Configuration

HANDS UP IF YOU DON T HAVE A VM OR IF YOU DON T REMEMBER YOUR PASSWORDS. Or something broke

Outline. Structure of a UNIX command

Introduction to UNIX. Logging in. Basic System Architecture 10/7/10. most systems have graphical login on Linux machines

LAB #7 Linux Tutorial

Introduction to Linux Workshop 1

CS Fundamentals of Programming II Fall Very Basic UNIX

CS197U: A Hands on Introduction to Unix

CSCI 2132 Software Development. Lecture 3: Unix Shells and Other Basic Concepts

Getting Started with UNIX

Introduction to Linux for BlueBEAR. January

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1

Orchid Core VMS Installation Guide

EECS Software Tools. Lab 2 Tutorial: Introduction to UNIX/Linux. Tilemachos Pechlivanoglou

CIS 76 Ethical Hacking Building an open source Pentest Sandbox, carrying out a Remote Code Execution exploit, and Remediating the RCE vulnerability.

Operating Systems Linux 1-2 Measurements Background material

Linux crash lecture by Andrey Lukyanenko

The Command Shell. Fundamentals of Computer Science

Introduction to Unix and Linux. Workshop 1: Directories and Files

Installation Manual InfraManage.NET Installation Instructions for Ubuntu

Using Ruby and irb in CSE 341 Winter 2015

Apache Manual Install Ubuntu Php Mysql. Phpmyadmin No >>>CLICK HERE<<<

In this exercise you will practice working with HDFS, the Hadoop. You will use the HDFS command line tool and the Hue File Browser

Transcription:

Network Monitoring & Management A few Linux basics

Our chosen platform Ubuntu Linux 14.04.3 LTS 64-bit LTS = Long Term Support no GUI, we administer using ssh Ubuntu is Debian underneath There are other platforms you could use: CentOS / RedHat, FreeBSD, This isn t a UNIX admin course, but some knowledge is necessary: Worksheets are mostly step-by-step Please help each other or ask us for help

You need to be able to. Be root when necessary: sudo <cmd> Install packages $ sudo apt-get install <pkg> Edit files $ sudo joe /etc/mailname $ sudo vi /etc/mailname Check for the process apache $ ps auxwww grep apache Start/Stop services $ service <NAME> start stop restart

joe editor Ctrl-C quit without saving Ctrl-K X to quit and save Cursors work as you expect We provide a PDF reference in the materials

vi editor The default editor for all UNIX and Linux distributions Can be difficult to use If you know it and prefer to use vi please do We provide a PDF reference in the materials

Other tools Terminate foreground program: ctrl-c Browse the filesystem: cd /etc ls ls -l Rename and delete files mv file file.bak rm file.bak

Viewing files Sometimes files are viewed through a pager program ( more, less, cat ). Example: man sudo Space bar for next page b to go backwards / and a pattern (/text) to search n to find next match N to find previous match q to quit

Using ssh Configuring and using ssh incorrectly will guarantee a security compromise The wrong way: Using simple passwords for users Allowing root to login with a password In reality allowing any login with password The right way: Disable all password access Disable root access with password Some disable root access completely

Using ssh: our way For class we will compromise. Our way: Allow user login with improved passwords Allow root login with ssh keys only Understanding password strength, see next slide * *https://xkcd.com/936/

No passwords are better

Exercises Please follow the instructions on the next few slides to practice a bit with Linux

Using ssh to connect to your VM Login to your virtual machine using ssh On Windows use putty.exe Connect to pcn as user sysadm We ll do that now... Accept Public Key when prompted Windows users can download putty from http://noc.ws.nsrc.org and connect Instructors will now assist everyone to connect

Improve password for sysadm Method 1 (moderately strong) 8 characters or more Not a word in any language A mix of numbers, upper and lower case Include some punctuation characters Method 2 (stronger) Use four words of 6 characters, or more Use unrelated words Examples (do not use these!) 1. Tr0ub4dor&3 2. CorrectHorseBatteryStaple

Change sysadm password Logged in as user sysadm do: $ passwd changing password for sysadm. (Current) UNIX password: <enter current password> Enter new UNIX password: <enter new password> Retype new UNIX password: <confirm new password> If everything goes well you will see the message: passwd: password updated successfully

Disable root user password access Logged in as user sysadm do: $ sudo editor /etc/ssh/sshd_config Find the lines that say: #PermitRootLogin no PermitRootLogin without-password No changes are needed, please leave these lines as they are and be sure you don t do this! PermitRootLogin yes

Installing packages 1. Exit from the file /etc/ssh/sshd_config 2. Install the joe editor package $ cd (takes you to your home directory) $ sudo apt-get update $ sudo apt-get install joe 3. Install the postfix mailserver and some utilities: $ sudo apt-get install postfix mutt mailutils 1. Select Internet Site when prompted 2. Accept the hostname presented. 3. For both screens tab to <Ok> and press ENTER to continue 4. Restart the mailserver: $ sudo service postfix restart

Troubleshooting: Your logs Log files are critical to solve problems. They reside (largely) in /var/log/ Some popular log files include: /var/log/syslog /var/log/apache2/error.log /var/log/mail.log And, many, many more To view the last entry in a log file: $ Sudo tail /var/log/syslog To view new entries as they happen: $ Sudo tail f /var/log/syslog Press ctrl-c to exit from the tail command.

Using search tricks with help (man) At the prompt type: - man ssh Search for ports by typing /ports press <ENTER> Press n to go to the next occurrence of port do this several times. Press N to search backwards. Press p to go to the start. Search on /-p and see what you find. Press h for all the keyboard shortcuts. Press q to quit from the man page.