2014年8月9日 星期六
Ubuntu install telnet service
1. $sudo apt-get install xinetd telnetd
安裝 xinetd 和 telnetd
2. $sudo vi /etc/inetd.conf or $sudo gedit /etc/inetd.conf
vi 是在terminal 下跟改文件內容
gedit 是 ubuntu 文字編輯器(圖形介面)
telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd
↑加入上面這行到檔案中
疑~奇怪 為什麼檔案裡沒有文字,嘿嘿嘿~~ 這也是我疑惑的地方 (正在尋找問題點)
3. $sudo vi /etc/xinetd.conf or $sudo gedit /etc/xinetd.conf
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
defaults
{
# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}
includedir /etc/xinetd.d
↑把這段選起來複製到妳的 xinetd.conf 文件中 (全部選取覆蓋你的文件就可以了)
4. $sudo vi /etc/xinetd.d/telnet or $sudo gedit /etc/xinetd.d/telnet
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
↑上面這段複製到妳的文件中吧!! 這個就確定是妳自己開的新文字檔案
如果沒有用的話 無法 telnet 到妳的 server 喔!!
5. $sudo service xinetd restart
從新啟動 xinetd service 吧!!
訂閱:
文章 (Atom)