免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 910 | 回复: 0
打印 上一主题 下一主题

centos配置ssh [复制链接]

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2022-03-04 22:35:50
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-05-02 08:49 |只看该作者 |倒序浏览

作者: yibin  出自: http://www.linuxdiyf.com
在VMware安装一个CentOS的Sever版,终端里的内容不可滚动,不方便。在win下远程登录不错(win下有个Xshell)。默认安装ssh是有的。只是hosts访问问题。
1.在hosts.deny文件尾添加sshd:ALL
意思是拒绝所有访问请求
[root@localhost ~]# vi /etc/hosts.deny
修改后看起来如下:
#
# hosts.deny This file describes the names of the hosts which are
# *not* allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow. In particular
# you should know that NFS uses portmap!
sshd:ALL
2.在hosts.allow文件尾添加sshd:192.168.0.
意思是允许192.168.0.1 到254的主机,内网。
[root@localhost ~]# vi /etc/hosts.allow
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
sshd:192.168.0.
3.重启ssh
[root@localhost ~]# /etc/rc.d/init.d/sshd restart
停止 sshd: [ 确定 ]
启动 sshd [ 确定 ]
好了,用putty和Xshell(Xmanager)可以登录了。

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/31/showart_654659.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP