Chinaunix
标题:
redhat 5 的FTP、TELNET、VNC服务开启方法!
[打印本页]
作者:
hfbluesky
时间:
2008-09-27 10:38
标题:
redhat 5 的FTP、TELNET、VNC服务开启方法!
1、开启FTP方法:
1)、用ntsysv命令查看vsftp服务是否被选?未选空格选中后确定。
2)、注释掉/etc/vsftpd/ftpusers中的root或删除此行;
3)、注释掉/etc/vsftpd/user_list中的root或删除此行;
4)、执行命令 setsebool ftpd_disable_trans 1
5)、重启FTP服务#service vsftpd restart。
2、开启telnet服务:
1)、用ntsysv命令查看xinetd服务是否被选?未选空格选中后确定。
2)、修改/etc/xinetd.d/krb5-telnet文件,将disable的值更改为no;
3)、重启xinetd服务#service xinetd restart。
注:redhat暂时没有发现通过更改设备来使用ROOT用户登录的方法,如有哪位GG知道,谢谢告之!
3、开启VNC服务
1)、使用ntsysv选中vncserver服务;
2)、vi /etc/sysconfig/vncservers,例:
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"
VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 800x600"
3)、root用户下使用vncserver命令设置VNC访问密码
4)、root用户下编辑/root/.vnc/xstartup文件,内容大致如下:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
5)、分别在root和weblogic用户下使用命令service vncserver restart重启服务
6)、在root用户下使用命令service iptables stop 关闭防火墙
作者:
lhl1212
时间:
2008-12-22 23:24
把selinux 关了就可以实现root telnet 了
将/etc/selinux/config中selinux=disabled
作者:
vermouth
时间:
2008-12-23 00:24
标题:
回复 #2 lhl1212 的帖子
是么?尝试下再说吧~
作者:
zqbxy
时间:
2009-12-16 15:40
redhat 5
红帽推荐用户使用安全的ssh来远程登录服务器,而不要使用telnet,因为telnet连接服务器时,密码是以明文方式传输。因此默认root是不允许telnet直接登录服务器的。
希望强制允许root通过telnet连接服务器,可以修改/etc/pam.d/login
注释掉这样的一行:
auth required /lib/security/pam_security.so
有的机器上可能是这样的一行:
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
修改完成以后,用户应该就可以以root身份登录服务器了。
如果还不行,那就将/etc/securetty这个文件改个名,该文件是定义root只能在tty1~tty6的终端上登录的,[man login]中有相关说明。#vi /etc/securetty
......
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
pts/0
pts/1
pts/2
pts/3
pts/4
添加以上内容
作者:
vermouth
时间:
2009-12-16 16:06
标题:
回复 #4 zqbxy 的帖子
远程访问用得是 pts 吧? 竟然挖到去年了!
作者:
zqbxy
时间:
2009-12-16 16:57
标题:
回复 #5 vermouth 的帖子
pts/0
pts/1
添加应该是添加pts/0
……
“该文件是定义root只能在tty1~tty6的终端上登录的”root 默认ssh
作者:
vermouth
时间:
2009-12-16 17:43
标题:
回复 #6 zqbxy 的帖子
ssh 需要在 /etc/ssh/sshd_config 里面说明下。
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2