Latest Linux Posts

Linux
Encrypting a drive with LUKS – Ubuntu Linux
Encryption is how the world keeps data private and secure, it is what enables secure administration, online purchases, bank transactions, and many more things that make the Internet what it is; you could argue that […]

Linux
Linux – Harden SSH
SSH is one of the most widely used administration methods for Linux servers and it is because of that you will find seemingly endless amounts of devices accessible on the Internet that are listening on […]

Linux
OpenSSH – Configure Key Based Authentication
By default when installing OpenSSH it will be configured to accept a user name and password combination for authentication. To increase security you can enable key based authentication and disable password authentication so that when […]
Linux Posts
-
In Python Generators are a way to create an iterator. If you are unfamiliar with what an iterator is in python for the sake of this article it is an object that you can loop [...]
-
I would say lambda functions in Python were one of the things I had a hard time not only understanding but also seeing the practicality of using in much of my code. However once I [...]
-
If you have been looking at any amount of Python code online and you have almost surly seen the following code at the end of a file. # classes and/or functions if __name__ == [...]
-
Encryption is how the world keeps data private and secure, it is what enables secure administration, online purchases, bank transactions, and many more things that make the Internet what it is; you could argue that [...]
-
When writing a script or program it is often required to do more than one thing at the same time for efficiency or to not cause the program to lock up while completing a long [...]
-
SSH is one of the most widely used administration methods for Linux servers and it is because of that you will find seemingly endless amounts of devices accessible on the Internet that are listening on [...]
-
In this article I will demonstrate how to compile your first Java program from the command line. Our first program will not be anything fancy, it will be the defacto standard first program everyone has [...]
-
The first thing you will need to do when you want to write code in Java is install the Java SDK (Software Development Kit) on your workstation. On the windows side of things it is [...]
-
By default when installing OpenSSH it will be configured to accept a user name and password combination for authentication. To increase security you can enable key based authentication and disable password authentication so that when [...]
-
Lets say you have a private/public key pair that you use to login to your server via SSH and you lose the public key, either it was deleted or corrupt and you don’t want to [...]
-
In this post I will be demonstrating how to generate an RSA private and public key pair for SSH authentication to a Linux server. Using key based authentication enhances security when accessing devices directly over [...]
-
In Python you can use list comprehensions to shorten the amount of code that you need to use to accomplish tasks when working with lists. The first time I heard of list comprehensions it sounded [...]
-
When writing CLI based applications in Python there often comes a time where you are running a loop and it may take a minute or 2 to complete your loop and break out, if the [...]
-
If you are familiar with the Linux command line you may have used the ‘df’ command to get an overview of the size of disks attached to your system along with used space and available [...]
-
In this post I will be outlining how to add a local user to a Cisco router or switch and enforce that router or switch to require a local user login when accessing the device [...]
-
In this post I will be outlining the Tkinter Entry widget and the various ways you can use it. The Entry widget is often used to display or enter a line of text and is [...]
-
If you work in an environment were it is common that there are more than 1 person in a device at a given time or you notice there are other people logged in when you [...]
-
A virtual environment can be extremely useful when developing multiple projects that require different dependencies, developing across multiple computers, and making it easier to collaborate with others on projects. In this post I will be [...]
-
When making potentially intrusive changes or doing fail over testing and you do not have physical access to the device, it is a good practice to save the working config, schedule a reboot and make [...]
-
In this post I will be outlining what a list is and the different things you can do with lists in Python such as recalling elements from lists, modifying lists, and reorganizing lists. The first [...]
-
When stacking multiple Cisco switches together in a stack there needs to be one switch in the stack that is designated as the “master” switch which can be thought of as the lead switch in [...]
-
Creating a string using variables is not a complex task but when chaining variables together it is very easy to make a mess of a few lines of code just to create a string you [...]
-
If you have ever uploaded an image to a switch that is not supported by that hardware you will be all too familiar with this. Keep in mind these instructions are written for a Cisco [...]
-
In this post I will be showing how to configure an IP tables firewall on a Ubuntu Linux server. At first glance configuring iptables seems cryptic and complex but once you analyze the commands and [...]
-
If you need your script to check if a file exists, for example before attempting to create one, it is relatively straight forward and easy to do so using the ‘os’ module. Below is a [...]
-
When running a python script it is many times beneficial to know where on the system the python file you are running is located, for instance if you have files in the same directory as [...]
-
Its possible that over time or when uploading new firmware to a switch the firmware that the switch is using to boot will become corrupt, in this case you will be left at a “switch:” [...]
-
Gathering input from a user in your GUI is something that will need to be done often, one basic way is to use a simple text entry field which i demonstrate below. In this example [...]
-
In this tutorial I am demonstrating how to add a button using Grid in Tkinter. Placing a basic button can be done with only 2 lines of code highlighted in the code block below. The [...]
-
Recently I was tracking down some performance issues on some of my switches and found myself checking the CPU and memory utilization quite often so I figured I would make this post, I show how [...]
-
Creating a bootable USB that contains bin files of the firmware that your routers/switches use is a good thing to have in your pocket as a network admin in the event you are shipped a [...]
-
Validating an image after transferring it from you computer to your switch or router is a smart thing to do when upgrading a firmware image to be sure that an image was properly transferred from [...]
-
Port groups work great if you have a set of ports that you will need to police in your firewall together in different rulesets, for instance if you want to allow or block all web [...]
-
There are times where you need to specify the length and width of the terminal when issuing commands either to properly format the output to be parsed by scripts easier, or to eliminate the need [...]
-
So Last week it was made public a vulnerability in the AirMAX firmware that allowed for remote command execution affected some of their AirMAX products. I came across it via This Link on Spiceworks, now at first glance [...]
-
These are instructions on how to specify a single switch in a switch stack to become the master switch every time and not hope the stack master election picks the one you want through a [...]
-
The last way I want to upgrade firmware is through the Serial port, even changing the baud rate to the highest possible takes forever to transfer an image, what I like to do is either hook my laptop [...]
-
In the Video I go through writing the code below which will add a notebook widget inside of your main window which will allow you to make tabs in your interface. The majority of the [...]
-
In this post I am showing how to create an authentication box in Tkinter that has some basic functionality you would expect out of an authentication box. I just wanted this to be a simplistic [...]
-
By default when placing widgets several columns apart using Grid it will not show any of the cells because they have not been given any weight. I cover how to add a weight [...]
-
When placing widgets (text boxes, buttons, etc.) in your user interface using Grid there will not be any whitespace between your widgets that are seperated by empty columns or rows by default unless you explicitly [...]
-
Creating a window in python and customizing it in some basic ways is very easy to do in python, in this post I will be showing how to create a main window and customize it [...]
-
It has been a few weeks since I have began using Ubuntu 16.04 LTS as my primary desktop at home and so far I do not have an intention to turn back although there are [...]
-
In this video tutorial I demonstrate syntax and behavior of running for, until, and while loops in addition to if statements in bash. This is geared toward the beginner who is learning loops and flow [...]
-
Making the switch from another OS as your primary desktop to Linux can be daunting especially if you are switching from Windows. This is something that I have tried a few times in the past [...]
-
I don’t work a whole lot with MySQL so it is easy for me to forget the syntax of the commands I need to use when setting up a server that needs a MySQL database [...]
-
The single most thing that gives a Bash script flexibility is using variables. A variable is just a container that you can fill with numbers, text, entire files, anything you can think of. You can [...]
-
One HUGE thing that has helped me out in my my career has been Linux scripting, and no I am not a Linux administrator for my day job though I do have a few Linux [...]
-
Hey, glad your here. This is my blog where I will be posting things that I want to talk about which I plan to be mainly technical things that I want to have written down [...]