본문
#yum -y install telnet-server
******************************************************************************************
[root@localhost include]# rpm -ql telnet-server
package telnet-server is not installed
[root@localhost include]# yum -y install telnet-server
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 1.2 kB 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for telnet-server to pack into transaction set.
telnet-server-0.17-37.i38 100% |=========================| 8.3 kB 00:00
---> Package telnet-server.i386 1:0.17-37 set to be updated
--> Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
telnet-server i386 1:0.17-37 core 35 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 35 k
Downloading Packages:
(1/1): telnet-server-0.17 100% |=========================| 35 kB 00:01
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: telnet-server [1/1]warning: /etc/xinetd.d/telnet created as /etc/xinetd.d/telnet.rpmnew
Installing: telnet-server ######################### [1/1]
Installed: telnet-server.i386 1:0.17-37
Complete!
******************************************************************************************
이렇게 완료가 되었다.. (Complete!)
그러면 깔린것이다. ㅋㅋ
2. /etc/xinetd.c/telnet 을 편집하여 telnet 을 사용가능 하도록 설정한다.
******************************************************************************************
service telnet
{
disable = no <---- 이부분에서 yes를 no로 바꾸주라
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
******************************************************************************************
만약 이런식으로 되어 있던지
only_from=210.110.xxx.xxx
access_times=09:00-18:00 <------ 이것은 접속 시간을 설정하는것이다.(필요시 넣어도됨)
없을때 위와 같이 설정을 다 설정을 해줘야 한다. (기본적인 설정이다.)
3. xinetd 데몬을 재시작해줘야 한다.
#service xinetd restart
******************************************************************************************
[root@localhost ~]# service xinetd restart
/etc/sysconfig/i18n: line 1: //LANG=ko_KR.UTF-8: No such file or directory
/etc/sysconfig/i18n: line 2: //LANG=ko_KR.eucKR: No such file or directory
/etc/sysconfig/i18n: line 1: //LANG=ko_KR.UTF-8: No such file or directory
/etc/sysconfig/i18n: line 2: //LANG=ko_KR.eucKR: No such file or directory
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@localhost ~]#
******************************************************************************************
이런식으로 데몬을 재실행시켜주면 된다.
그럼 telnet 접속이 가능하게 될것이다.
4. telnet이 잘실행 되는지 확인하자
#telnet localhost
******************************************************************************************
[root@localhost ~]# telnet localhost
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
Fedora Core release 6 (Zod)
Kernel 2.6.18-1.2798.fc6 on an i686
login: cybinny
Password:
Last login: Fri Oct 19 00:17:20 from localhost
-bash: //LANG=ko_KR.UTF-8: No such file or directory
-bash: //LANG=ko_KR.eucKR: No such file or directory
[cybinny@localhost ~]$
******************************************************************************************
5. 만약 실행이 안된다면 방확벽이 실행되어 있는지 확인해보자
#vi /etc/sysconfig/iptables
******************************************************************************************
# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 2049 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 23 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT
******************************************************************************************
23번 포트 번호가 설정되어 있는지 확인한다.
안되어 있으면 설정을 해주자!!
그리고 나서 방화벽을 재실행 해주자
#/etc/init.d/iptables restart <---- 방화벽 재실행
6. telnet는 root 계정으로 들어갈수가 없다.
#/etc/securetty 를 바꿔주면 된다.
#mv /etc/securetty /etc/securetty.back
그리고 나서 다실행하면 된다.
7. 만약 그래도 안되며는 ntsysv 에서 telnet를 설정해주자.
#ntsysv
8. 윈도우 cmd 창에서 실행을 하면.....
cmd에서 telnet 실행
관련링크
- http://littletrue.egloos.com/3951892 1229회 연결
댓글목록
등록된 댓글이 없습니다.