OpenTechShed

Blog of Things

Page 2 of 2

bash function/alias for ssh connectivity

In the home or work lab, I often have to connect to various devices that are either temporary or don’t support SSH keys. In my home lab, I typically set all the lab equipment with a standard username and password, which allows me to connect to them quickly. As almost all devices these days support SSH, I setup a bash function that acts as an alias allowing me to quickly connect to a device using SSH either from my Mac or Linux desktop.

View Full Post

Copy SSH Key to Multiple Servers

This blog post captures details on how to copy SSH key to multiple servers. If you manage more than one Linux server and have been challenged with automating mundane tasks, using SSH keys to login to a server without having to enter your password can be extremely irritating. There are more than one way to automate login to a Linux server.

  1. Use a utility like sshpass where you can provide the password as an argument.
  2. Use public-private SSH key pair.
Steps Involved
  1. Creating SSH Keys
  2. Copy SSH Key to Servers

View Full Post

PowerCLI Core on CentOS 7

VMware released PowerCLI Core for Linux and Mac that allows users to run cmdlets, which were possible to run only on Windows earlier. This post captures details on how to install PowerCLI Core on CentOS 7.

Steps Involved
  1. Install Microsoft .NET Core
  2. Install PowerShell
  3. Compile curl from source
  4. Install PowerCLI Core

View Full Post

Deploying NetBox on Digital Ocean

In an earlier post, I went through the details on how to install and configure NetBox on CentOS 7. This post captures an automated way of deploying NetBox on a Digital Ocean droplet.

The automated process has been tested only on CentOS 7 droplet and will install and configure the following:

View Full Post

NetBox Installation and Configuration on CentOS 7

This post captures details on how to install NetBox and configure it on a server running CentOS 7. NetBox is an IP address management (IPAM) and data center infrastructure management (DCIM) tool. As part of the install process, we shall be installing and configuring, the following:

  1. PostgreSQL – Database used by NetBox
  2. Apache – NetBox can be made accessible either using Apache or nginx. This post covers Apache and setting it up as reverse proxy.
  3. NetBox – the application itself
  4. gunicorn – Python WSGI server
  5. supervisord – a process control system used to control gunicorn.
  6. firewalld – used to configure firewall on CentOS 7

View Full Post

Check the inode, it’s not always disk

A while ago I was assisting someone to troubleshoot login failures for a CGI application. I noticed that the CGI session information was not being written to the /tmp directory on the Linux server.

First suspect: Disk space.

df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p2      32G   26G  4.1G  87% /
/dev/cciss/c0d0p1      97M   26M   67M  28% /boot
none                 1003M  8.0K 1003M   1% /dev/shm

View Full Post

FortiOS debug execute command

In order to debug whether the FortiOS has received the command executed on the shell, one can use the following process. This example below shows the reboot command being sent and how it’s received by FortiOS system init process.

Configure Logging

We want the logs to be stored in memory so that they can be reviewed. Use the following commands to log debug messages to memory.

Note: Disable this after troubleshooting has been completed.

View Full Post

Page 2 of 2