0

Cisco Console via aux Port

You need to use your Cisco through the console, like an enable secret recovery, but you forgot your usb-serial dongle. If you have another Cisco near by with remote access you are safe!

Preparation

Start connecting a Cisco console cable (cross over cable) from the console port of the router (routerc) to the auxiliary port of the helpful router (routerh).

After remotely accessing routerh configure it’s aux line

routerh#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
routerh(config)#line aux 0
routerh(config-line)# transport input telnet
routerh(config-line)#^Z
routerh#

Using the console

We need to know the line number of the AUX port and the IP address of this routerh

routerh#sh line
   Tty Typ     Tx/Rx    A Modem  Roty AccO AccI   Uses   Noise  Overruns   Int
      0 CTY              -    -      -    -    -      0       0     0/0       -
      1 AUX   9600/9600  -    -      -    -    -     13      21     0/0       -
*     2 VTY              -    -      -    -    5    202       0     0/0       -
      3 VTY              -    -      -    -    5      1       0     0/0       -
      4 VTY              -    -      -    -    5   4358       0     0/0       -
      5 VTY              -    -      -    -    5    125       0     0/0       -
      6 VTY              -    -      -    -    5      1       0     0/0       -

routerh#

It shows the aux port is on line 1. Our IP address is 192.168.1.1

To access the console you have to telnet your local IP address at port 2000 plus the line number:

routerh#telnet 192.168.1.1 2001
Trying 192.168.1.1, 2001 ... Open

routerh line 1 


User Access Verification

Username: biafra
Password: 
[ENTER]

routerc line 1 


User Access Verification

Username: biafra
Password: 

routerc#

And you are now using the console of routerc. Please note that you may have no console access restrictions as it’s shown here because of AAA.

Suspending and Disconnecting

You can get back to routerh with ctrl-6 x (or ctrl-shift-6 x).

routerh#sh users
    Line       User       Host(s)              Idle       Location
   1 aux 0     biafra     idle                 00:00:13 192.168.1.1
*  2 vty 0     biafra     192.168.1.1          00:00:09 10.0.0.10

  Interface    User               Mode         Idle     Peer Address

routerh#

Just hitting enter or entering the session number you are connected again to the remote console.

To disconnect just check the aux line with sh users and

routerh#clear line 1
[confirm]
 [OK]
routerh#
[Resuming connection 1 to 192.168.1.1 ... ]

[Connection to 192.168.1.1 closed by foreign host]
routerh#

routerh#sh users
    Line       User       Host(s)              Idle       Location
*  2 vty 0     biafra     192.168.1.1          00:00:14 10.0.0.10

  Interface    User               Mode         Idle     Peer Address

routerh#

To remember

Configure the aux port and suspend the console with ctrl-6 x.

1

Update Java in Linux Ubuntu

Tired of the browser pop-up window asking you to update Java ?

Yes, and we should do it specially because of the usual security concerns.
I’ve done this with Ubuntu 13.04 and 12.04 LTS.

Go to the Java download page and get your “Linux” or “Linux x64” version.

I got the x64 one.

Let’s unpack it. I already have /opt/java/64. You may have a different place.

$ cd /opt/java/64/

$ sudo tar zxvf ~biafra/Downloads/jre-7u25-linux-x64.tar.gz

Now update Ubuntu configuration with the new Java options

$ sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jre1.7.0_25/bin/java" 1
$ sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/java/64/jre1.7.0_25/bin/javaws" 1

$ sudo update-alternatives --install "/usr/lib/mozilla/plugins/libjavaplugin.so" "mozilla-javaplugin.so" "/opt/java/64/jre1.7.0_25/lib/amd64/libnpjp2.so" 1

Let’s force Ubuntu to use the new update

$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                               Priority   Status
------------------------------------------------------------
* 0            /opt/java/64/jre1.7.0_21/bin/java   2000      auto mode
  1            /opt/java/64/jre1.7.0_21/bin/java   2000      manual mode
  2            /opt/java/64/jre1.7.0_25/bin/java   1         manual mode

Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /opt/java/64/jre1.7.0_25/bin/java to provide /usr/bin/java (java) in manual mode

Done!

Warning! You may think that everything is fine now but there’s a bug in the new update. If you try to open a page with a Java application you may be redirected to java.com!

I used this workaround:

$ rm ~/.java/deployment/config.cache

Go to the page which need Java and it will work again as expected.

Update 2013.10.18: Depending on your browser you may have to update your default java plugin with

$ sudo update-alternatives --config mozilla-javaplugin.so

or

$ sudo update-alternatives --config firefox-javaplugin.so
5

Install HP Support Software in your Ubuntu Server

UPDATE: site changed from hp.com to hpe.com. This still works for 14.04 and 16.04 ! Just change the precise down there to trusty or xenial

We have some HP Proliant DL rack servers with Ubuntu 12.04 LTS. Knowing HP officially supports Ubuntu distributions we may install their management software to help with inventory and monitoring.

What to Install

We need to add the HP Support Software repository to every system.

Add the following line

deb http://downloads.linux.hpe.com/SDR/downloads/MCP/ubuntu precise current/non-free

to a new file under aptitude sources directory

$ sudo vi /etc/apt/sources.list.d/hp-proliant-support-pack.list

Please do a sudo apt-get update

Then install all these packages.

$ sudo apt-get install hpsmh hp-snmp-agents hp-smh-templates hponcfg hp-health hpacucli

Depending on what you already have installed apt may install other packages or tell you some suggestions.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  binutils libperl5.14 libsensors4 libsnmp-base libsnmp15 libssl0.9.8 libxslt1.1 snmpd
  xsltproc
Suggested packages:
  binutils-doc lm-sensors snmp-mibs-downloader
The following NEW packages will be installed:
  binutils hp-health hp-smh-templates hp-snmp-agents hpacucli hponcfg hpsmh libperl5.14
  libsensors4 libsnmp-base libsnmp15 libssl0.9.8 libxslt1.1 snmpd xsltproc
0 upgraded, 15 newly installed, 0 to remove and 2 not upgraded.
Need to get 33.3 MB of archives.
After this operation, 106 MB of additional disk space will be used.
Do you want to continue [Y/n]? 
WARNING: The following packages cannot be authenticated!
  hp-health hp-snmp-agents hpsmh hp-smh-templates hpacucli hponcfg
Install these packages without verification [y/N]? 

If you are using snmpd you may like to read a previous note from me.

Final configurations

Along the installation of those packages you may have been warned:

WARNING:hp-snmp-agents is not configured.
You must type '/sbin/hpsnmpconfig' as 'root' user to configure agents.

It’s time to run it now.

Opening your browser with http://servername:2381/ let’s you see the HP System Management Homepage

Please edit /opt/hp/hpsmh/conf/smhpd.xml and restart hpsmhd so you control whom can access.

$ sudo service hpsmhd restart

Finally

Well, now browse through each package man pages to learn features and configuration tweaks. Don’t forget HP maintains a web presence to Ubuntu support