CentOS 6.4安装OpenSSH Server服务(SSH远程) -云主机博士

CentOS 6.4安装OpenSSH Server服务(SSH远程) -云主机博士 第1张

安装好了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-server

OpenSSH 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

宝塔服务器面板,一键全能部署及管理,送你3188元礼包,点我领取


iproyal.png
原文链接:,转发请注明来源!
「CentOS 6.4安装OpenSSH Server服务(SSH远程) -云主机博士」评论列表

发表评论