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

Similar documents
Basic Linux Security. Roman Bohuk University of Virginia

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

The Wonderful World of Services VINCE

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

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

GNU/Linux 101. Casey McLaughlin. Research Computing Center Spring Workshop Series 2018

LAN Setup Reflection. Ask yourself some questions: o Does your VM have the correct IP? o Are you able to ping some locations, internal and external?

Network Monitoring & Management. A few Linux basics

Linux Kung Fu. Ross Ventresca UBNetDef, Fall 2017

How to Back Up Linux/UNIX Data Using SSHFS

Operating Systems Lab 1 (Users, Groups, and Security)

Linux Kung Fu. Stephen James UBNetDef, Spring 2017

= Session-(1.4) Preparing the Workstation for the Lab / OS Installation = Session-(1.4) Preparing the Workstation for the Lab / OS Installation

CS197U: A Hands on Introduction to Unix

LAN Setup Reflection

PULLING STRINGS. Learn how to save time and streamline your system administration with the help of Puppet, a centralized

The kernel is the low-level software that manages hardware, multitasks programs, etc.

IT 341: Introduction to System Administration. Notes for Project #9: Automating the Backup Process

Sit with your new teammate

Everything about Linux User- and Filemanagement

Creating a Yubikey MFA Service in AWS

Introduction. What is Linux? What is the difference between a client and a server?

Bitnami Pimcore for Huawei Enterprise Cloud

Troubleshooting. Contacting Cisco TAC. Checking the Version Number of Cisco Configuration Engine APPENDIXA

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

Answers to Even- Numbered Exercises

CROWDCOIN MASTERNODE SETUP COLD WALLET ON WINDOWS WITH LINUX VPS

Hawk Server for Linux. Installation Guide. Beta Version MHInvent Limited. All rights reserved.

Raspberry Pi (RPi) Setup Documentation Instrumentation Development Lab Department of Physics and Astronomy University of Hawaii at Manoa

Setting up a Chaincoin Masternode

CompTIA Linux Course Overview. Prerequisites/Audience. Course Outline. Exam Code: XK0-002 Course Length: 5 Days

Linux Systems Administration Getting Started with Linux

Automatic Creation of a Virtual Network with VBoxManage [1]

Contents. Crave Masternode Setup Guides. Single / Multiple Local Masternode(s) Single Masternode using a VPS. Multiple Masternodes using a VPS

Introduction to the shell Part II

DogeCash Masternode Setup Guide Version 1.2 (Ubuntu 16.04)

Working with Ubuntu Linux. Track 2 Workshop June 2010 Pago Pago, American Samoa

Perl and R Scripting for Biologists

BPPM Patrol Agent Installation Steps on Linux and Automation Integration

cron How-To How to use cron to Schedule rsync Synchronizations September 29, 2004

Unix Tutorial Haverford Astronomy 2014/2015

Licensing the Application CHAPTER

RH-202. RedHat. Redhat Certified Technician on Redhat Enterprise Linux 4 (Labs)

Step by Step Single KVM/Virtual Ubuntu Server 14.04

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

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

Aliases are set manually or in a login script. Aliases that were set manually will be gone the next time you login.

LAB #7 Linux Tutorial

Linux Systems Security. Access Control and Authentication NETS1028 Fall 2016

CSE 265: System and Network Administration

L.A.M.P. Stack Part I

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

CS197U: A Hands on Introduction to Unix

LOCAL WALLET (COLD WALLET):

Post Ubuntu Install Exercises

Windows Subsystem for Linux Guide Documentation

Bitnami OroCRM for Huawei Enterprise Cloud

This guide assumes that you are setting up a masternode for the first time. You will need:

Crontab To Run Every 5 Minutes In Hp-ux

Step 1 - Install Apache and PostgreSQL

SA2 v6 Linux System Administration II Net Configuration, Software, Troubleshooting

Jackson State University Department of Computer Science CSC / Computer Security Fall 2013 Instructor: Dr. Natarajan Meghanathan

Wallet Installation Guide for Staking on Raspberry PI

The following topics explain how and when Prime Network performs backups.

Masternode Setup Guide

AOS 452 Lab 9 Handout Automated Plot Generation

Topics. Installation Basics of Using GNU/ Linux Administration Tools

OBSERVEIT CLOUDTHREAT GUIDE

Setting up the Seagate D4 NAS with Hard Disk Sentinel Pro. By Gary Ryan. Adapted from:

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

OPERATING SYSTEMS LINUX

XCloner. Official User Manual. Copyright 2010 JoomlaPlug.com All rights reserved.

Review of Fundamentals. Todd Kelley CST8207 Todd Kelley 1

PiCloud. Building owncloud on a Raspberry PI

Using RDP with Azure Linux Virtual Machines

LINUX FUNDAMENTALS. Supported Distributions: Red Hat Enterprise Linux 6 SUSE Linux Enterprise 11 Ubuntu LTS. Recommended Class Length: 5 days

OPENSTACK CLOUD RUNNING IN A VIRTUAL MACHINE. In Preferences, add 3 Host-only Ethernet Adapters with the following IP Addresses:

There are two tools with which you should be familiar: the program su, and more importantly, sudo. Here we see how to use them.

Masternode Setup Guide

IT341 Introduction to System Administration. Project 4 - Backup Strategies with rsync and crontab

Project #3: Implementing NIS

Getting Started Guide. Installation and Setup Instructions. For version Copyright 2009 Code 42 Software, Inc. All rights reserved

Users and Groups. his chapter is devoted to the Users and Groups module, which allows you to create and manage UNIX user accounts and UNIX groups.

Appliance Guide. Version 1.0

Singularity: container formats

LINUX VPS GUIDE. Pre-requisites: (this guide assumes you are using windows)

Introduction to UNIX/LINUX Security. Hu Weiwei

SmartCash SmartNode Setup Guide v1.2. Windows 10. Date: 13/01/2018. By (Jazz) yoyomonkey

Lab Working with Linux Command Line

MarketC - Masternode Setup Guide

Prerequisites: Students should be comfortable with computers. No familiarity with Linux or other Unix operating systems is required.

CompTIA Exam LX0-102 Linux Part 2 Version: 10.0 [ Total Questions: 177 ]

Installing Altiris Agent on Ubuntu

Course Wiki. Today s Topics. Web Resources. Amazon EC2. Linux. Apache PHP. Workflow and Tools. Extensible Networking Platform 1

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

Kodaro s Niagara 4 Port Installation Guide

Installing SeisComP3

Ch 9: Periodic Processes

Subscriptions and Recurring Payments 2.X

Installation Manual InfraManage.NET Installation Instructions for Ubuntu

Transcription:

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

Securing your VM 101 Getting Comfy in Linux -> Comfort ++

You After This Talk

Quick recap from last week. Setup our first VM on Redbrick. Almost broke daniel Installed Ubuntu Server. Broke the Network. So now that we have a kinda working machine lets get to work

Access Over VNC Open a terminal Use the ssh command. Now on your local pc, Open VNC client and connect to loacalhost port 5900

First Things First. run tail.bashrc you should see the below output next as root cat /etc/apt/apt.conf.d/proxy Assuming all is correct lets move on

First Things First. Lets fix the network. We need to change the Gateway and DNS name server before we can do anything we need to be root. su up: type su enter your password (if you remember it) nano /etc/network/interfaces change : gateway to 136.206.16.254 change : dns-nameservers to 136.206.16.254 save the file now run /etc/init.d/networking restart

Now that the network works... Login into your redbrick account and ssh to your vm using the login details you created. ssh $your_username@$your_vm_ip Because of your firewalls you can only ssh to your vm from redbrick. Now that we have access over ssh Lets update the package lists to the newest versions run apt-get update

Su > Sudo: Sudo : allows any user in the sudoers file to run commands as root provided they have the sudoers passwd. elevates your permissions in your current shell, (kind of blurs the lines between the user and root ) Su: Allows users to login as root. They have full control of the operating system. Maintains root until the user logs out of root. (Or they timeout)

Intruder Alert: Fending off the bot-nets First we need a new root password. to change your password type passwd Don't forget this password Now that we have a secure root password lets disable root ssh and users ability to sudo(including you). 1) First we need to find the config files 2) Next we need to edit the config file to disable root 3) Then we need to find the sudoers file. Anyone any ideas?

Intruder Alert: Fending off the bot-nets So the first file we need is the sshd_config which is found in /etc/ssh. Once we have found the file we need to change PermitRootLogin yes to PermitRootLogin no The next file we need is /etc/sudoers By Default /etc/sudoers is read only and can only be edited by using the command visudo we want to comment out the line that says %sudo ALL=(ALL:ALL) ALL To comment out the line put a # infront of it and save the file

HTOP > TOP :

This is HTOP

Let s install HTOP: Run: apt-get install htop Some useful htop flags -u : allows you to view the output for a particular user. - htop -u $username -d : allows you to delay the time between updates (10ths of seconds) htop -d 15

Old friends GREP and (PIPE) Grep: Allows you to search for patterns in a commands output. : Allows you to string commands together. cat /etc/interfaces/networking - long output cat /etc/interfaces/networking grep gateway - only the output we want

But what if I m lazy?..aliases Aliases allow you you to be very very lazy. - You can write synonyms for commands. - SshBrick instead ssh $username@login.redbrick.dcu.ie:

Lets write some aliases I want to get back to my home directory quickly home - cd /home/username type > alias home= cd /home/username I m wondering what processes I am running at the moment. whatdo - ps aux grep $username type > alias whatdo= ps aux grep kylar I want to ssh to redbrick from my VM sshbrick ssh $username@login.redbrick.dcu.ie type > alias sshbrick= ssh $username@login.redbrick.dcu.ie

Cron

Cron The cron daemon allows you to run commands/scripts at regular intervals. On certain days, hours, months, weeks. So what would I use it for? Running backups Copying files to remote servers Sending automated emails Run crontab -e

Cron Syntax

Writing your first cron job. We re going to backup our home directories every day. Type crontab -e Read the instructions, You cron line should look like 0 0 * * 0 tar -zcf /var/backups/home.tgz /home/ This will back-up all user accounts ay 12am every sunday morning

Go through sections of the admin exam? Security Filesystems Networking Hardware Practical/Scripting Do more things with vms? Something completely different? More in depth command like talk? Tell us what you want?