Configure SSH Access on Cisco IOS


How to configure SSH access on Cisco IOS (switch or router):

1. Setting hostname and domain-name

switch# configure terminal
switch(config)#hostname catalyst
catalyst(config)#ip domain-name

2. Generate RSA keys (use 1024 bit for SSHv2 enabled)

catalyst(config)#crypto key generate rsa

3. Configure line vty

catalyst(config)#line vty 0 15
catalyst(config-line)#login local
catalyst(config-line)#transport input ssh

4. Create local user/pass

catalyst(config)#username [user] privilege 15 secret [password]

5. Fine tuning

catalyst(config)#line vty 0 15
catalyst(config-line)#exec-timeout 5
catalyst(config)#ip ssh version 2



Comments Off on Configure SSH Access on Cisco IOS

Error Restarting Network Service in CentOS 7


Today I got this error message when restarting network service with # systemctl restart network.service or # service network restart:

Restarting network (via systemctl): Job for network.service failed. See 'systemctl status network.service' and 'journalctl -xn' for details.

Browsing around for a while, then found this solution:

# systemctl stop NetworkManager
# systemctl disable NetworkManager

After disabling NetworkManger, restarting network service succeeded.


Comments Off on Error Restarting Network Service in CentOS 7

All-in-One Software Defined Network (SDN) VM


If you want to jumpstart learning SDN without installing every single software on operating system, Srini Seetharaman has all-in-one VM that already installed with necessary SDN learning software.

The sofware and tools installed on the VM (listed by

  • SDN Controllers: OpenDaylight, ONOS, RYU, Floodlight, Floodlight-OF1.3, POX, and Trema
  • Example code for a hub, L2 learning switch, traffic tap, and other applications
  • Open vSwitch 2.3.0 with support for Openflow 1.2, 1.3 and 1.4, and LINC switch
  • Mininet to create and run example topologies
  • Pyretic
  • Wireshark 1.12.1 with native support for OpenFlow parsing
  • JDK 1.8, Eclipse Luna, and Maven 3.3.3

These are the instruction steps:

  1. Install VirtualBox or Vmware Player/Fusion
  2. Install Putty and Xming (for Windows) or Xquartz (for Mac)
  3. Download appliance from one of these link:
  4. Import downloaded file (SDN_tutorial_VM_XXbit.ova) to VirtualBox or Vmware Player/Fusion
  5. Start the VM (user/password: ubuntu/ubuntu)


Comments Off on All-in-One Software Defined Network (SDN) VM

Apt-get update error

linux, server

As Debian big fan, sometime I found that apt-get update command reveal this error:
“E: Some index files failed to download. They have been ignored, or old ones used instead.”

This command is very simple solution I found:

# rm /var/lib/apt/lists/partial/*

After that, apt-get update && apt-get upgrade command should be fine.


Comments Off on Apt-get update error

Clean /boot Partition in CentOS 6

linux, server

/boot Partition in CentOS 6 can be cleaned by removing old kernels.

These are the steps:

1. Check /boot partition (98% used)

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        93M   86M  2.1M  98% /boot

2. Check installed kernel

# rpm -q kernel

3. Install package-cleanup

# yum install yum-utils
# package-cleanup --oldkernels --count=2
 Package              Arch                 Version                        Repository                                              Size
 kernel               x86_64               2.6.32-431.el6                 @anaconda-CentOS-201311272149.x86_64/6.5               121 M

Transaction Summary
Remove        1 Package(s)

Installed size: 121 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : kernel-2.6.32-431.el6.x86_64                                                                                        1/1 
  Verifying  : kernel-2.6.32-431.el6.x86_64                                                                                        1/1 

  kernel.x86_64 0:2.6.32-431.el6                                                                                                       


4. Check /boot partition (67% used)

# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        93M   59M   30M  67% /boot

5. Limit only 2 latest kernel for later updates

# vim /etc/yum.conf
   ...[edit yum.conf]...
   ...[edit yum.conf]...


Comments Off on Clean /boot Partition in CentOS 6

SSH Server Administration

linux, server

Having several Linux Servers, SSH access is mandatory communication between me and those servers. These are several tips for SSH Server administration that save the day:

Add these line on /etc/ssh/sshd_config:

  • Allow only specific user (never use root login for remote SSH access)
    AllowUsers username
    DenyUsers All
  • Disable DNS and GSSAPI (solving slow login respond, especially from private network)
    UseDNS no
    GSSAPIAuthentication no

Make sure to restart SSH service after changing sshd_config:

# service ssh restart


# /etc/init.d/ssh restart

Additional tip:

  • Add this options on /etc/resolv.conf (solving slow login respond on RHEL/CentOS)
options single-request-reopen


Comments Off on SSH Server Administration

SquidAnalyzer Installation

linux, server

– Linux Debian 7.7 (amd64)
– Squid Cache 3.1.20

– Download SquidAnalyzer-6.1 from


# tar -zxvf squidanalyzer-6.1.tar.gz
# cd squidanalyzer-6.1
# perl Makefile.PL
# make
# make install
# vim /etc/apache2/sites-enabled/000-default
    ...[add to 000-default file]...
        <Directory /var/www/squidanalyzer>
            Options -Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            Allow from all
    ...[add to 000-default file]...
# service apache2 restart
# /usr/local/bin/squid-analyzer
# crontab -e
    ...[edit crontab]...
    0 2 * * * /usr/local/bin/squid-analyzer > /dev/null 2>&1
    ...[edit crontab]...

– use .htaccess to protect page


Comments Off on SquidAnalyzer Installation

SARG (Squid Analysis Report Generator) Installation

linux, server

– Linux Debian 7.7 (amd64)
– Squid Cache 3.1.20

– Get the latest update from repository #apt-get update


# apt-get install sarg
# vim /etc/sarg/sarg.conf
    ...[edit sarg.conf]...
    access_log /var/log/squid3/access.log
    date_format e
    overwrite_report yes
    output_dir /var/www/sarg
    ...[edit sarg.conf]...
# /usr/bin/sarg -x
# crontab -e
    ...[edit crontab]...
    0 2 * * * /usr/bin/sarg -x
    ...[edit crontab]...

– Open http://Server-IP-Address/sarg to operate SARG


Comments Off on SARG (Squid Analysis Report Generator) Installation

Bug in Zimbra 8.5.0 GA


Zimbra 8.5.0 GA has bug that can make WebApp Service won’t start.
Solution can be met with these steps:

$ zmprov -l ms `zmhostname` +zimbraServiceEnabled service
$ zmprov -l ms `zmhostname` +zimbraServiceEnabled zimbra
$ zmprov -l ms `zmhostname` +zimbraServiceEnabled zimbraAdmin
$ zmprov -l ms `zmhostname` +zimbraServiceEnabled zimlet
$ zmmailboxdctl restart


Comments Off on Bug in Zimbra 8.5.0 GA

Root Samsung Galaxy Note 8 N5100 (4.4.2 KitKat Firmware)


How to Root Samsung Galaxy Note 8 GT-N5100 (4.4.2 KitKat Firmware):

1. Files needed

  • USB Driver
  • CF-Auto-Root Package (for Samsung GT-N5100)
  • Odin3
    (included in CF-Auto-Root Package)

2. Preparation

  • [on Note8] Enable USB Debugging
    Settings => About Device => Tap “Build Number” repeatedly (7 times)
    [Developer Options Menu will appear]
    Settings => Developer Options => USB Debugging [enabled]
  • [on Note8] Check battery percentage
    At least 50% remain
  • [on PC] Install USB Driver

3. Rooting:

  • [on PC] Extract
  • [on PC] Run Odin3-v3.07.exe
    From extraction
  • [on Note8] Reboot Note8 to Download Mode
    Press “Volume Down + Home + Power” buttons until “Warning!!” screen appear
    Press “Volume Up” to continue
  • [on PC] Plug Note8 to PC with USB Data Cable
    Make sure Odin3 detect Note8 by “Added!!” message appear
  • [on Odin3] Press “PDA” button in Odin3
    And select CF-Auto-Root-kona3g-kona3gxx-gtn5100.tar.md5 file from extraction
  • [on Odin3] Press “Start”
    Flashing kernel started
  • [on Note8] Note8 will be rooted and reboot
    Unplug USB Data Cable
    After Note8 start, check that SuperSU has been installed
    Check with Root Checker application
  • Congratulation, Note8 has been rooted successfully



Comments Off on Root Samsung Galaxy Note 8 N5100 (4.4.2 KitKat Firmware)
« Older Posts