Programmer's Blog

Programmer's reference

Category Archives: telnet

Setup telnet server

1. install telnet, xinetd and telnet-server

2. Edit file /etc/securetty by add

  pts/0
  pts/1
  pts/2
  pts/3
  pts/4
  pts/5
  pts/6
  pts/7
  pts/8
  pts/9

3. Restart both Service.

 # service xinetd restart
 # chkconfig telnet on
 # chkconfig --list|grep telnet
Advertisements

Shell script for telnet telnet.sh

must use sleep since the response time is slow in bash

//———

{
 sleep 0.4
 echo "username"
 sleep 0.4
 echo "password"
 sleep 0.5
 echo "ls -lrt"
 sleep 0.3
 echo "exit"
 } | telnet 192.168.1.1