Run / Execute Command Using SSH

[email protected] ~ # ssh-keygen -t rsa
[email protected] ~ # ssh-copy-id -i /root/.ssh/id_rsa.pub ‘[email protected] -p PPPP’
[email protected] ~ # ssh -p PPPP [email protected] ‘/etc/init.d/nfs restart’

[email protected] ~ # crontab -e
###FOR server2 [email protected]:30 AM every day
30 5 * * * ssh -p PPPP [email protected] ‘/etc/init.d/nfs restart’

# date
Thu Feb 23 18:55:20 AZT 2017

HP Lights-Out Online Configuration Utility for Linux (AMD64/EM64T)

In this topic I will describe how to reset HP iLO username/password

My version was iLO2 but by HP instruction it is supported on 2-3-4 versions as well:

http://h20564.www2.hpe.com/hpsc/swd/public/detail?swItemId=MTX_0852a40470894456b684221d92#tab3

 

Prerequisites:
This utility requires the following minimum firmware revisions:

  • Integrated Lights-Out 2 firmware v1.00 or later
  • Integrated Lights-Out 3 firmware v1.00 or later
  • Integrated Lights-Out 4 firmware v1.00 or later

The management interface driver and management agents must be installed on the server.

To ensure the integrity of your download, HP recommends verifying your results with this MD5 Checksum value:

b65ddcc1d826bee12b12d72d5ade9ab2 hponcfg-4.3.1-0.x86_64.rpm

Reboot Requirement:
Reboot is optional after installation. Updates will be effective after reboot. Hardware stability will be maintained without reboot.

Installation:
Login as the system administrator (root), download the RPM to a directory on your hard drive and change to that directory.

If a previous version of the Hponcfg utility has been installed, it must be removed before this package can be installed. To remove the previous version of the package, type the following :

    rpm -e hponcfg

To install the package, type:

    rpm -ivh hponcfg-x.x.x.x86_64.rpm

After installation, the executable for hponcfg utility can be found under the directory /sbin.

[[email protected] ~]# ether-wake -i eth0 00:25:B3:E4:0B:42 -b

 

 

[email protected]:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:25:b3:e4:0b:42
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:411063 errors:0 dropped:1955 overruns:0 frame:0
TX packets:117039 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:280226316 (280.2 MB)  TX bytes:14632616 (14.6 MB)

[email protected]:~# dmidecode | grep -i Proliant
Product Name: ProLiant DL380 G5
Family: ProLiant

[email protected]:~# vi ./reset.xml

 

<RIBCL VERSION=”2.0″>
<LOGIN USER_LOGIN=”Administrator” PASSWORD=”unknown”>
<USER_INFO MODE=”write”>
<MOD_USER USER_LOGIN=”Administrator”>
<PASSWORD value=”pa55w0rd”/>
</MOD_USER>
</USER_INFO>
</LOGIN>
</RIBCL>

 

[email protected]:~# hponcfg -f ./reset.xml

Script succeeded

By default iLO will get ip over DHCP if it is exists in network :)

We can now login with “Administrator” and “pa55w0rd”…

 

HP iLO’s configuration file can be imported or exported as an XML file.
In case you have accidentally made your HP iLO interface unreachable through network, you can export its configuration file using the following command:

[email protected]:~# hponcfg -a -w ilo2conf.xml

Now you can edit the XML file to change any part of the HP iLO’s configuration you want.

Modify it according to your network requirements and reload the new configuration file using the command:

[email protected]:~# hponcfg -f ilo2conf_NEW.xml

 

thank you!

 

[email protected]:~# date
Wed Feb 15 17:08:56 AZT 2017

Cisco NetFlow9 Config

First put this config on your router:

joker(config)# ip flow-export destination 10.2.0.171 9996
joker(config)# ip flow-export source Gi 0/1.210
joker(config)# ip flow-export version 9
joker(config)# ip route-cache cef
joker(config)# interface Gi 0/1.10
joker(config-subif)# ip flow egress
joker(config)# interface Gi 0/1.210
joker(config-subif)# ip flow egress

Then you need to check mib indexes of interfaces which shall be monitored:

joker#sh snmp mib ifmib ifindex

GigabitEthernet0/1: Ifindex = 3
GigabitEthernet0/1.10: Ifindex = 8
Tunnel0: Ifindex = 7
Backplane-GigabitEthernet0/3: Ifindex = 1
GigabitEthernet0/1.210: Ifindex = 10
GigabitEthernet0/1.381: Ifindex = 11
Embedded-Service-Engine0/0: Ifindex = 5
Null0: Ifindex = 6
GigabitEthernet0/2: Ifindex = 4
GigabitEthernet0/0: Ifindex = 2
NVI0: Ifindex = 9

Add appropriate indexes into your Netflow Analyzer software :)
# date Tue Feb 10 23:11:37 AZT 2017 [email protected]

CCNP Routing EIGRP Stub Sim

# date
Tue Feb 06 16:47:18 AZT 2017
[email protected]