Thursday, May 21, 2015

SSH ProxyCommand example: Going through one host to reach another server

How do I use and jump through one server to reach another using ssh on a Linux or Unix-like systems? Is it possible to connect to another host via an intermediary so that the client can act as if the connection were direct using ssh?

You can jump host using ProxyCommand.Some times you can only access a remote server via ssh by first login into an intermediary server (or firewall/jump host). So you first login into to the intermediary server and then ssh to another server. You need to authenticate twice and the chain can be long and is not limited to just two hosts.

Wednesday, May 20, 2015

How to run sudo command without a password on a Linux or Unix

'm a new Unix system user. How do I use sudo command without a password on a Linux or Unix-like systems?

Some times you may need to run a command with root privileges, but you do not want to type a password using sudo command. This is useful for scripting or any other purpose. This can be achieved by editing /etc/sudoers file and setting up correct entries. ou need to consider any security consequence of allowing a sudo command execute without a password.

Sunday, May 17, 2015

How To Patch and Protect Linux Server Against the VENOM Vulnerability # CVE-2015-3456

A very serious security problem has been found in the virtual floppy drive QEMU's code used by many computer virtualization platforms including Xen, KVM, VirtualBox, and the native QEMU client. It is called VENOM vulnerability. How can I fix VENOM vulnerability and protect my Linux server against the attack? How do I verify that my server has been fixed against the VENOM vulnerability?

Saturday, May 16, 2015

How To CentOS / RHEL 7 Install Gnome Desktop Using Yum

I installed minimal CentOS Linux 7.x on my laptop. How can I install Gnome desktop GUI on a RHEL (Red Hat) 7 or CentOS Linux 7 system using command line option?

GNOME is a highly intuitive and user friendly desktop environment for CentOS and RHEL 7.x based system. If you did a minimal install, this guide will quicly tell you how to install Gnome GUI on a CentOS 7 or RHEL 7 using a command line options.

Friday, May 15, 2015

Linux/Unix: OpenSSH Multiplexer To Speed Up OpenSSH Connections

ow can I multiplex SSH sessions by setting up a master session and then having subsequent sessions go through the master to speed up my ssh connection on a Linux or Unix-like operating systems?

Multiplexing is nothing but send more than one ssh connection over a single connection. OpenSSH can reuse an existing TCP connection for multiple concurrent SSH sessions. This results into reduction of the overhead of creating new TCP connections. First, you need to set a ControlMaster to open a Unix domain socket locally Rest of all your ssh commands connects to the ControlMaster via a Unix domain socket. The ControlMaster provides us the following benefits:

Tuesday, May 12, 2015

Monday, May 11, 2015

CentOS/RHEL Use yum Command To Downgrade or Rollback Updates

I'm a CentOS Linux 7.x server user. How can I use yum command to downgrade or rollback package updates on a RHEL (Red Hat)/CentOS/Scientific Linux server?

In this tutorial, you will learn:
  1. How to downgrade installed packages using YUM
  2. How to rollback installed package to previous version
The following examples only work on

Sunday, May 10, 2015

HowTo Block Internet Explorer Browser With Squid Proxy Server on a Linux/Unix Server

want to block Internet Explorer (MS-IE) browser on a squid proxy server running on a Linux or Unix-like systems. How can I block IE on a squid proxy server version 3.x?

You need to setup an acl on a squid proxy server to block Microsoft Internet Explorer or any other browser of your choice. This tutorials explains how to block Internet Explorer browsers with Squid proxy running on a Ubuntu Linux and CentOS Linux version 6.x server. This is also useful to fix an known vulnerability coming from a specific version of browser. Please note the following acl based on user-agents and it can be spoofed easily.

Wednesday, May 6, 2015

RHEL / CentOS Linux 7 Enable Ping Access In Docker Container

I'm using RHEL 7.1-4 container on a RHEL /CentOS Linux 7.x server. However, I'm unable to ping external site/IP address using the ping command. I'm getting the following error on screen:
ping: Operation not permitted
How do I fix this problem?

Linux kernel v2.2+, divides the privileges traditionally associated with superuser into distinct units, known as capabilities, which can be independently enabled and disabled. Capabilities are a per-thread attribute. For example, CAP_NET_ADMIN capabilities perform various network-related operations such as:

Tuesday, May 5, 2015

HowTo Debian/Ubuntu Linux Auto Mount Windows NTFS File System [ntfs-3g]

I'm dual booting MS-Windows with a Debian / Ubuntu Linux desktop. How can I auto mount a drive containing a MS-Windows NTFS file system on a Linux based systems?

The New Technology File System (NTFS) is a file system developed by Microsoft in 1995 with Windows NT. You can easily auto mount a hard disk drive partition containing a NTFS using the following method on any modern Linux desktop.

Monday, May 4, 2015

Debian/Ubuntu Linux: Find If Installed Package Includes a Fix/Patch Via CVE Number

 I am a Debian Linux serer user. How do I view the changelog of an installed package and find out if given CVE includes a fix or patch? How do I see a fix or patch already applied to installed package on a Ubuntu or Debian LTS server?

The changelog of an installed package is usaully stored as follows on a Debian or Ubuntu or Mint Linux: