Secrets of a linux ninja  Software Freedom Day 2013 Johannesburg, South Africa
Upcoming SlideShare
Loading in...5
×
 

Secrets of a linux ninja Software Freedom Day 2013 Johannesburg, South Africa

on

  • 764 views

The slides from a hands on lab given on Software Freedom Day on the 31 August 2013 at the University of the Witwatersrand. ...

The slides from a hands on lab given on Software Freedom Day on the 31 August 2013 at the University of the Witwatersrand.

It was aimed at showing some of the lesser know features of well known commands as well as some lesser known, yet powerful and command line tools

Statistics

Views

Total Views
764
Slideshare-icon Views on SlideShare
764
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Secrets of a linux ninja  Software Freedom Day 2013 Johannesburg, South Africa Secrets of a linux ninja Software Freedom Day 2013 Johannesburg, South Africa Presentation Transcript

    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 1/22 SECRETS OF A LINUX NINJA Created by /Mark Clarke @mxc4
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 2/22 LESSON 1: SSH! A NINJA IS SILENT!
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 3/22 Access lan based services via incoming SSH access, Get external SSH access even if its not enabled, Forward X sessions over SSH, Bypass web proxy restrictions “Take things as they are. Punch when you have to punch. Kick when you have to kick.”
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 4/22 LAB SET UP Micro-server represents lan. Laptop virtual machine represents external host. Laptop host machine is gateway Lan Net:192.168.1.0/24 External Net:192.168.122.0/24 Gateway:192.168.1.4/192.168.122.1 Lan Host:192.168.1.3 External Host:192.168.122.192
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 5/22 ACCESS A LAN BASED SERVICE WITH INCOMING SSH ACCESS Scenario: You have ssh access to the lan but no VPN access, You need to access a web application running on the lan. Web App: http://192.168.1.3/ninja.html
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 6/22 GET EXTERNAL SSH ACCESS EVEN IF ITS NOT ENABLED Scenario: You have no external ssh access to network You can connect to external ssh servers from the lan
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 7/22 FORWARD X SESSIONS OVER SSH Scenario: XDMCP is disabled, You have SSH access, XForwarding is enabled in sshd config file,
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 8/22 BYPASS WEB PROXY RESTRICTIONS Scenario: Your offices uses a web proxy which restricts traffic to sites with vital information, You have external SSH access,
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 9/22 LESSON 2: NINJA MOVES
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 10/22 Transferring files over SSH Resuming partial transfers over SSH Mounting a share over SSH Transferring files with netcat “Do not pray for an easy life, pray for the strength to endure a difficult one.”
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 11/22 TRANSFERRING FILES OVER SSH Scenario: You have no ftp/NFS/Samba share access on the server. You need to copy over a file. You have SSH access.
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 12/22 RESUMING PARTIAL TRANSFERS OVER SSH Scenario: You are using scp to copy files, Your download 60 minute download interrupts after 40 minutes and you want to resume.
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 13/22 MOUNTING A SHARE OVER SSH Scenario: You want to mount a remote folder on a server, You have no share access, Only have SSH access
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 14/22 TRANSFERRING FILES WITH NETCAT Scenario: You need to transfer a file and have no SSH access.
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 15/22 LESSON 3: A NINJA OBSERVES
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 16/22 Monitoring disks for signs of failure Command line tools: iotop,vmstat,iostat,psacct “I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times.”
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 17/22 MONITORING DISKS FOR SIGNS OF FAILURE Scenario: You know your disks will fail. You just don't know when. Use smartctl to monitor your disks.
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 18/22 COMMAND LINE TOOLS Scenario: What process is grinding your disks? - iotop Where is the bottle neck - disk io, memory or network - vmstat Which user or system account is using all your resources - psacct Your server crashes and you don't know why - sar
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 19/22 LESSON 4: A CLEAN KILL
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 20/22 Using regular expressions to kill Who is preventing you from unmounting a block device? “Take things as they are. Punch when you have to punch. Kick when you have to kick.”
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 21/22 USING REGULAR EXPRESSIONS TO KILL Scenario: You have a process to kill often and it a mission to get its pid all the time pkill killall -r
    • 26/09/2013 Secrets of a Linux Ninja - SFD 2013 Johannesburg, South Africa file:///home/mark/Documents/presentations/linux-ninja/index.html#/ 22/22 WHO IS PREVENTING YOU FROM UNMOUNTING A BLOCK DEVICE? Scenario: You trying to unmount a device but you can't because a process/user is accessing it fuser