Escapechar
Tests the functionality of telnet escape characters including the default escape character (Ctrl+]) and custom escape characters. The escape character allows users to return to the telnet command prompt without closing the connection, enabling various telnet commands.
Telnet Default Escape Character
Description
- Test telnet connection using the default escape character
Ctrl+]. After establishing the connection, pressing
Ctrl+], should display the telnet prompt.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.215.168.20/24 set service telnet set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.215.168.21/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Ping IP address 10.215.168.20 from DUT1:
admin@DUT1$ ping 10.215.168.20 count 1 size 56 timeout 1Show output
PING 10.215.168.20 (10.215.168.20) 56(84) bytes of data. 64 bytes from 10.215.168.20: icmp_seq=1 ttl=64 time=0.383 ms --- 10.215.168.20 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.383/0.383/0.383/0.000 ms
Step 4: Init a Telnet connection from DUT1 to IP address 10.215.168.20 :
admin@DUT1$ telnet 10.215.168.20Show output
Trying 10.215.168.20... Connected to 10.215.168.20. Escape character is '^]'. Linux 6.1.140 (osdx) (pts/0) osdx login: Password: Welcome to Teldat OSDx v4.2.8.1 This system includes free software. Contact Teldat for licenses information and source code. Last login: Thu Dec 11 18:34:14 UTC 2025 from 11::3 on pts/0 admin@osdx$
After pressing the escape character Ctrl+], the telnet prompt should appear:
Show output
telnet>
Telnet Custom Escape Character
Description
- Test telnet connection using a custom escape character
L. After establishing the connection, pressing
L, should display the telnet prompt.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 address 10.215.168.20/24 set service telnet set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces ethernet eth0 address 10.215.168.21/24 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Ping IP address 10.215.168.20 from DUT1:
admin@DUT1$ ping 10.215.168.20 count 1 size 56 timeout 1Show output
PING 10.215.168.20 (10.215.168.20) 56(84) bytes of data. 64 bytes from 10.215.168.20: icmp_seq=1 ttl=64 time=0.309 ms --- 10.215.168.20 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.309/0.309/0.309/0.000 ms
Step 4: Init a Telnet connection from DUT1 to IP address 10.215.168.20
using escapechar L :
admin@DUT1$ telnet 10.215.168.20 escapechar LShow output
Telnet escape character is 'L'. Trying 10.215.168.20... Connected to 10.215.168.20. Escape character is 'L'. Linux 6.1.140 (osdx) (pts/0) osdx login: Password: Welcome to Teldat OSDx v4.2.8.1 This system includes free software. Contact Teldat for licenses information and source code. Last login: Thu Dec 11 18:35:00 UTC 2025 from ::ffff:10.215.168.21 on pts/0 admin@osdx$
After pressing the custom escape character L, the telnet prompt should appear:
Show output
telnet>