安裝telnet-server發現yum代理問題
一 問題如下:
[[email protected] tech]# yum install xinetd
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
core [1/4]
Cannot find a valid baseurl for repo: core
Error: Cannot find a valid baseurl for repo: core
安裝telnet-server發現yum問題, 最初認為是repo出了問題, 查詢error: cannot find a valid baseurl for repo:core, 通過網路查詢, 沒有什麼問題.比較adsl上網同實驗室上網的差異, 覺得可能是由於proxy伺服器的原因.
通過google查 yum proxy problem得如下問題解
Re: Yum proxy problem
--------------------------------------------------------------------------------
From: Jeff Vian <[email protected]>
Date: Sun, 19 Mar 2006 11:44:35 -0600
--------------------------------------------------------------------------------
On Sun, 2006-03-19 at 22:41 +0530, Sumeet Pal Singh wrote:
Hi
I installed FC4 and tried to configure yum to work. I am behind a
proxy server which requires authentication.
My /etc/yum.conf file is
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=0
# The proxy server - proxy server:port number
proxy=http://vsnlproxy.iitk.ac.in:3128/
# The account details for yum connections
proxy_username=spsingh
proxy_password=password
I had a password with % in it. When trying yum update I got HTTP Error
407 ie proxy authentication required. When i tried to search for the
problem on net, I came across this
http://beau.org/pipermail/whitebox-users/2004-March/000781.html
which shows that the guy had problem connecting because of special
character which yum could not understand/encrypt.
I did the same.Changed my password so that it had alphanumeric only
and yum worked!!!!!
Wget, apt (on ubuntu5.10 and FC4) used to work with old password.
Is this a problem with yum. Can someone please test it out!! Also can
I submit it as bug?
Not a problem but a design of the program.
% is a special character to the shell and it must be escaped so it is
passed literally or not used in most of these circumstances.
I had same problem while installing gentoo previous month. it did not
emerge and finally I gave up the installation. Can someone please test
this and let me know. i will appreciate it. My email id is
[email protected]
Thanks in Advance.
----------------------------------------------------------------
終於搞定. 雖然ssh安全可靠,但netterm的介面明顯比putty好看, 感覺上更好. 所以還是配上玩玩, 再個xinetd上以前不是掛了很多服務的嗎?慢慢玩吧, 可能service 的配置更集中, 好管理吧.
最後還是再推薦一下"鳥哥的 Linux 私房菜:"寫得太好了.
1、開啟服務
方法一:使用ntsysv,在出現的視窗之中,將 telnet前面*加上,然後按下 OK 。
方法二:編輯 /etc/xinetd.d/telnet
[[email protected] root]# vi /etc/xinetd.d/telnet
找到 disable = yes 將 yes 改成 no 。
2、啟用服務
[[email protected] root]# service xinetd restart
三、測試服務
[[email protected] root]#telnet ip(或者hostname)
如果配置正確,系統提示輸入遠端機器的使用者名稱和密碼
Login:
Password:
注:預設只允許普通使用者
四、設定telnet埠
#vi /etc/services
進入編輯模式後查詢telnet(vi編輯方式下輸入/telnet)
會找到如下內容:
telnet 23/tcp
telnet 23/udp
將23修改成未使用的埠號(如:2000),退出vi,重啟telnet服務,telnet預設埠號就被修改了。
五、Telnet服務限制
telnet是明文傳送口令和資料的,如果你對其預設的設定不滿意,有必要對其服務範圍進行限制。假設你
的主機的ip是210.45.160.17,就可以按如下方式設定了,^_^!
#vi /etc/xinetd.d/telnet
service telnet
{
disable = no #啟用 telnet 服務,no
bind = 210.45.160.17 #your ip
only_from = 210.45.0.0/16 #只允許 210.45.0.0 ~ 210.45.255.255 這個網段進入
only_from = .edu.cn #只有教育網才能進入!
no_access = 210.45.160.{115,116} #這兩個ip不可登陸
access_times= 8:00-12:00 20:00-23:59 # 每天只有這兩個時間段開放服務
......
}
六、Telnet root使用者的登入
telnet 不是很安全,預設的情況之下不允許 root 以 telnet 進入 Linux 主機 。若要允許root使用者登
入,可用下列方法:
[root @wljs /root]# vi /etc/pam.d/login
#auth required pam_securetty.so #將這一行加上註釋!
或
[[email protected] root]# mv /etc/securetty /etc/securetty.bak
這樣, root 就可以直接進入 Linux 主機了。不過,建議不要這樣做。也可以在普通使用者進入後,切換
到root使用者,擁有root的許可權。