6.12.2 Working with Telnet and SSH Session to a Device

 

WebNMS Application/Applet Client supports Telnet and SSH for managing the devices remotely. Once a device is discovered as a node, Telnet menu is enabled by default.



 

Working with Telnet

 

By default, the Telnet option is provided to log in to any remote device discovered in a network.

Configuring the Telnet Window

 

Telnet menu available in the maps can be further enhanced by configuring the following additional parameters:

 

You can implement the following additional features by modifying the snmpmenu.xml and nodemenu.xml files located in the <WebNMS Home>/mapdata/menus directory. The configuration files available in <Web NMS Home>/listmenus should also be configured with the same modifications. Ensure to restart the WebNMS Server if you have modified these configuration files.

Automatic Login

 

To enable automatic login while opening a Telnet Session to a device, configure the following parameters:
 

port: The port in which the Telnet Server is running.

loginPrompt: This is the prompt issued by the remote device for getting the user name or login name. Typically this is "login" for Unix systems.

username: This is the user name or login name that is present on the system.

passwordPrompt: This is the prompt issued by the remote system for getting the password for the user name provided. Typically this is "Password" for Unix systems.

password: The password for the user name.

 

<?xml version="1.0"?>

<!DOCTYPE MENU SYSTEM "menu.dtd">

<MENU

..........

.......... 

<MENU-ITEM

name="Telnet to device">

<JAVA-UI

action_type="openframe"

action_value="com.adventnet.telnet.telnetwindow.NmsTelnetFrame?host=${ipAddress}&amp;port=23&amp;username=guest&amp;loginPrompt=login:&amp;passwordPrompt=Password:&amp;password=guest">

</JAVA-UI>

</MENU-ITEM>

</MENU>

 

Note:

  1. When the remote device does not prompt for User Name there is no need to set the User Name and Login Prompt.

  2. When the remote device does not prompt for Password there is no need to set the Password and Password Prompt.

 

Setting the Frame Title

 

<MENU-ITEM

name="Telnet to device">

<JAVA-UI

action_type="openframe" action_value="com.adventnet.telnet.telnetwindow.NmsTelnetFrame?host=${ipAddress}&amp;frameTitle=MyFrameTitle"> 

</JAVA-UI>

</MENU-ITEM>   
 

Setting the Font Size

 

<MENU-ITEM

name="Telnet to device">

<JAVA-UI

action_type="openframe"  action_value="com.adventnet.telnet.telnetwindow.NmsTelnetFrame?host=${ipAddress}&amp;fontSize=11">

</JAVA-UI>

</MENU-ITEM>
 

Setting the Encoding Type

 

<MENU-ITEM

name="Telnet to device">

<JAVA-UI

action_type="openframe" action_value="com.adventnet.telnet.telnetwindow.NmsTelnetFrame?host=${ipAddress}&amp;encoding=gb2312">

</JAVA-UI>

</MENU-ITEM>

 

Setting the Terminal Type

 

<MENU-ITEM

name="Telnet to device">

<JAVA-UI

action_type="openframe" action_value="com.adventnet.telnet.telnetwindow.NmsTelnetFrame?host=${ipAddress}&amp;terminalType=vt100">

</JAVA-UI>

</MENU-ITEM>
 

Setting the Socket Timeout
 

<MENU-ITEM

name="Telnet to device">

<JAVA-UI

action_type="openframe" action_value="com.adventnet.telnet.telnetwindow.NmsTelnetFrame?host=${ipAddress}&amp;socketTimeout=300">

</JAVA-UI>

</MENU-ITEM>

 

Note: The Socket Timeout is set in seconds.

 

Setting the Icon Image
 

<MENU-ITEM

name="Telnet to device">

<JAVA-UI

action_type="openframe" action_value="com.adventnet.telnet.telnetwindow.NmsTelnetFrame?host=${ipAddress}&amp;iconImage=Image.png">

</JAVA-UI>

</MENU-ITEM>

 

Note: The Image (Image.png) icon can be placed in AdventNetCLI.jar in the com.adventnet.telnet.telnetwindow package. It can also be placed in any other directory from where the application starts and the parameter for iconImage has to be set as /ImagesHome/Image.png

 

Closing Telnet Window automatically on disconnecting from Remote Host
 

<MENU-ITEM

name="Telnet to device">

<JAVA-UI

action_type="openframe"

action_value="com.adventnet.telnet.telnetwindow.NmsTelnetFrame?host=${ipAddress}&amp;closeOnDisconnect=true">

</JAVA-UI>

</MENU-ITEM>

 

Note: If closeOnDisconnect is set to any other value than true / TRUE, the Telnet Window remains open.

 

Starting Telnet Session to a Device

 

On configuring the above parameters, you can start the Telnet Session to a device.

Note: The telnet functionality will be invoked using the RMI API "TELNET". Therefore, RMI is necessary for the telnet client to work.

 

Top

 

Working with SSH

 

SSH is a secured connection between device and Server, which needs valid user name and password to log in. The user has to authenticate before connecting to the device remotely. SSH to Device menu is an optional menu item (not available in Client by default), which can be enabled by configuring Server-side configuration files.

  1. Note: SSH is available in two versions, namely SSH1 and SSH2.

Configuring SSH to Device Menu Item

 

To enable menu item in WebNMS Client

#java com.adventnet.nms.telnet.telnetwindow.StartTelnetClient

[SSH_SUPPORT_REQUIRED true/false]

PROCESS com.adventnet.nms.telnet.telnetwindow.StartTelnetClient

ARGS SSH_SUPPORT_REQUIRED true

#java com.adventnet.nms.fe.telnet.telnetwindow.StartTelnetClientFE

[SSH_SUPPORT_REQUIRED true/false]

PROCESS 

com.adventnet.nms.fe.telnet.telnetwindow.StartTelnetClientFE

ARGS SSH_SUPPORT_REQUIRED true

 

<MENU-ITEM name="SSH to device">

<JAVA-UI

action_value="com.adventnet.telnet.telnetwindow.NmsTelnetFrame?host=${ipAddress}&amp;port=22&amp;sshRequired=true"

action_type="openframe"/>

</MENU-ITEM>

To enable automatic SSH login to device in menu item of WebNMS Client

      1. Edit the nodemenu.xmlsnmpmenu.xml, and routermenu.xml files located in the <WebNMS Home>/mapdata/menus directory and add the following:

<MENU-ITEM name="SSH to device">
<JAVA-UI

action_type="openframe" action_value="com.adventnet.telnet.telnetwindow.NmsTelnetFrame?host=${ipAddress}&amp;port=22&amp;closeOnDisconnect=true&amp;sshRequired=true&amp;username=root&amp;password=rootpwd"/>
</MENU-ITEM>

      1. Edit the nodemenu.xml and snmpmenu.xml files located in the <WebNMS Home>/listmenus directory and add the following:

<MENU-ITEM name="SSH to device">
<JAVA-UI

action_type="openframe" action_value="com.adventnet.telnet.telnetwindow.NmsTelnetFrame?host=${ipAddress}&amp;port=22&amp;closeOnDisconnect=true&amp;sshRequired=true&amp;username=root&amp;password=rootpwd"/>
</MENU-ITEM>

 

Note:

  • For enabling SSH functionality, the parameter sshRequired must be set to true in the client menu, as shown in the menu item entries given above.

  • In case of SSH2, the JAVA_HOME variable of the setEnv.bat/sh script must be set to JRE 1.4 or above.

 

 

Starting SSH Session to Device

 

On configuring the above parameters, you can start the SSH Session to a device.

Top

 


Copyright © 2013, ZOHO Corp. All Rights Reserved.