[an error occurred while processing this directive]

Support

Configuring Telnet

Hierarchical Navigation

Downloads

 Feedback

Configuring Telnet

This chapter contains the following sections:

Information About the Telnet Server

The Telnet protocol enables you to set up TCP/IP connections to a host. Telnet allows a user at one site to establish a TCP connection to a login server at another site and then pass the keystrokes from one device to the other. Telnet can accept either an IP address or a domain name as the remote device address.

Prerequisites for Telnet

You have configured IP on a Layer 3 interface, out of band on the mgmt 0 interface.

Guidelines and Limitations for Telnet

  • The Telnet server is disabled by default.
  • Cisco NX-OS commands may differ from Cisco IOS commands.

Default Setting for Telnet

Parameter

Default

Telnet server

Disabled

Configuring Telnet

Enabling the Telnet Server

The Telnet server is enabled by default, but you can reenable the server if necessary.

Before You Begin

Log in to the CLI in EXEC mode.

Procedure
     Command or ActionPurpose
    Step 1 switch# configure terminal  

    Enters global configuration mode.

     
    Step 2switch(config)# feature telnet  

    Enables the Telnet server.

     
    Step 3switch(config)# show telnet server   (Optional)

    Displays the Telnet server configuration.

     
    Step 4switch(config)# copy running-config startup-config   (Optional)

    Copies the running configuration to the startup configuration.

     

    The following example enables the Telnet server:

    switch# configure terminal
    switch(config)# feature telnet
    switch(config)# show telnet server
    telnet service enabled
    switch(config)# copy running-config startup-config

    Starting an IP Telnet Session to a Remote Device

    Before You Begin
    • Log in to the CLI in EXEC mode.
    • Verify that the Telnet server is enabled and that the server is also enabled on the remote device.
    • Obtain the hostname for the remote device and, if needed, the username on the remote device.
    Procedure
       Command or ActionPurpose
      Step 1 switch# telnet {ip address | host-name} [port-number] [vrf vrf-name]  

      Creates an IP Telnet session to the specified destination.

      The keywords and arguments are as follows:

      • port-number—Port number to use for this session. The range is from 1 to 65535. The default port number is 23.
      • vrf-name—Default virtual routing and forwarding (VRF) instance.
       

      Clearing Telnet Sessions

      Before You Begin

      Log in to the CLI in EXEC mode.

      Procedure
         Command or ActionPurpose
        Step 1switch# show users  

        Displays user session information.

         
        Step 2switch# clear line vty-line  

        Clears a user Telnet session.

        vty-line—The Virtual Teminal Line (VTY) to clear.

         
        Step 3switch# show users   (Optional)

        Displays user session information.

         

        The following example clears a Telnet session:

        switch# show users
        NAME     LINE         TIME         IDLE          PID COMMENT
        admin    tty1         Jul 25 19:13  old         2867
        admin    pts/1        Jul 28 14:04   .         31453 (::ffff:171.70.209.8)
        admin    pts/2        Jul 28 14:04   .         31475 (171.70.209.8)*
        switch# clear line 1
        switch# show users
        NAME     LINE         TIME         IDLE          PID COMMENT
        admin    tty1         Jul 25 19:13  old         2867
        admin    pts/2        Jul 28 14:04   .         31475 (171.70.209.8)*
        switch#

        Verifying the Telnet Configuration

        Use one of the following commands to verify the configuration:

        Command

        Purpose

        show running-config security [all]

        Displays the SSH and user account configuration in the running configuration. The all keyword displays the default values for the SSH and user accounts.

        show telnet server

        Displays the Telnet server configuration.

        show hosts

        Displays the configuration details for current hosts.

        Example 1: show running-config security all

        The following example displays the user account configuration in the running configuration for :

        switch(config)# show running-config security all
        
        !Command: show running-config security all
        !Time: Tue Sep 17 22:04:20 2013
        
        version 5.2(1)SK1(2.1)
        feature telnet
        feature http-server
        no feature scp-server
        no feature sftp-server
        feature ssh
        
        username adminbackup password 5 ! role network-operator
        username admin password 5 $1$qnBf/DZs$SADurdd7yy/VMA19E./N11 role network-admin
        username admin keypair rsa
        username ajidas password 5 $1$L8yMjMMy$xIGNCA.CkgnVY70nBqnhr1 expire 2020-12-30 
        role network-operator
        password strength-check
        
        banner motd #Nexus 1000v Switch
        #
        
        ssh key rsa 2048 
        no ssh key dsa

        Example 2: show telnet server

        The following example displays the Telnet server configuration:

        switch(config)# show telnet server
        telnet service enabled

        Example 3: show hosts

        The following example displays the configuration details for current hosts:

        switch(config)# show hosts
        DNS lookup enabled
        Name/address lookup uses domain service
        Name servers are 255.255.255.255
        
        
        Host                    Address
        host1                   192.0.2.0
        host2                   198.51.100.0
        host3                   203.0.113.0

        Feature History for Telnet

        Feature Name

        Feature Information

        Telnet

        Release 5.2(1)SK1(2.1)

        This feature was introduced.


        [an error occurred while processing this directive]