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

PikPak安卓最新版APP v1.46.2_免费会员兑换邀请码【508001】可替代115网盘_全平台支持Windows和苹果iOS&Mac_ipad_iphone -云主机博士 第1张

推荐阅读:

[AI-人工智能]免翻墙的AI利器:樱桃茶·智域GPT,让你轻松使用ChatGPT和Midjourney - 免费AIGC工具 - 拼车/合租账号 八折优惠码: AIGCJOEDISCOUNT2024

[AI-人工智能]银河录像局: 国内可靠的AI工具与流媒体的合租平台 高效省钱、现号秒发、翻车赔偿、无限续费|95折优惠码: AIGCJOE

[AI-人工智能]NexGenAI - 您的智能助手,最低价体验ChatGPT Plus共享账号

[AI-人工智能]边界AICHAT - 超级永久终身会员激活 史诗级神器,口碑炸裂!300万人都在用的AI平台

安装好了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远程) -云主机博士」评论列表

发表评论