安装好了CentOS 6.4,我想让它作为一个服务器,可以让我的Windows 7电脑远程登录。 安装OpenSSH Server 首先,我们搜索一下CentOS的软件库里面有没有已经定义好的SSH服务器包:
$ yum search ssh ... ... openssh.x86_64 : An open source implementation of SSH protocol versions 1 and 2 openssh-askpass.x86_64 : A passphrase dialog for OpenSSH and X openssh-clients.x86_64 : An open source SSH client applications openssh-ldap.x86_64 : A LDAP support for open source SSH server daemon openssh-server.x86_64 : An open source SSH server daemon ... ...OpenSSH是Secure Shell的一个开源实现。从上面的搜索结果可以看到,CentOS的软件库里面已经有了OpenSSH的服务器包(openssh-server)和客户端包(openssh-clients),用yum install可以直接安装。
$ yum install openssh-serverOpenSSH Server安装完成后在/etc/init.d目录下应该会增加一个名为sshd的服务。
$ chkconfig --list sshd sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off手动启动sshd服务,方便后面客户端的连接: 关闭: /etc/init.d/sshd stop 启动: /etc/init.d/sshd start 重启: /etc/init.d/sshd restart 1、重启后生效 开启:chkconfig sshd on 关闭:chkconfig sshd off 2、即时生效,重启后失效 开启:service sshd start 关闭:service sshd stop