We use Telnet for remotely accessing a device. For accessing the device first you have to configure IP address at management interface and that IP address must be reachable from your network. After reaching the IP address you are able to telnet to your desired device with the telnet command.
For example, if you configure your JUNOS device with a management interface address of 172.16.100.5/24, and your accessible device IP address is 172.16.100.151/24 and within your network and you can ping to your device IP address. Its better check this first:
user@geek> ping 172.16.100.5 PING 172.16.100.5 (172.16.100.5): 56 data bytes 64 bytes from 172.16.100.5: icmp_seq=0 ttl=64 time=1.979 ms 64 bytes from 172.16.100.5: icmp_seq=1 ttl=64 time=2.329 ms 64 bytes from 172.16.100.5: icmp_seq=2 ttl=64 time=2.598 ms ^C --- 172.16.100.5 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 1.979/2.302/2.598/0.253 ms
Now we can confirm the reachability of this device then enter the telnel command and you should able to access the device:
user@geek> telnet 172.16.100.5 Trying 172.16.100.5... telnet: connect to address 172.16.100.5: No route to host telnet: Unable to connect to remote host
Ohh, not connected… Accessing the device you should enable the telnet service. Mostly many people don’t configure the service when the configure the basic IP setup!! Now, you’re trying to access the device using Telnet, so you must tell the device to allow Telnet connections. To configure the Telnet service on the device, do the following:
[edit] user@geek# set system services telnet
[edit]
user@geek# show system { services { telnet; }
After the telnet configuration now you can able to access the device:
user@geek> telnet 172.16.100.5 Trying 172.16.100.5... Connected to 172.16.100.5. Escape character is '^]'. (ttyp0) login:
Then you just enter the username and password what you have already configured. If you need to know how to create user and password and make the user permission you can find this site.