树莓派 CentOS7 SSH配置

按照前文提及的内容下载的镜像,SSH服务已经安装并配置。

此文作为备查文档进行相关内容进行描述。

查看openssh-server 是否已经安装

[root@localhost ~]# yum list installed | grep openssh-server
openssh-server.aarch64               7.4p1-21.el7                      installed

查看相关的配置文件 /etc/ssh/sshd_config,如果需要可以进行编辑。

[root@localhost ~]# cat /etc/ssh/sshd_config
#       $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options override the
# default value.

# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER
#
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
[root@localhost ~]# vi /etc/ssh/sshd_config

# ------------------------------------------------
Port 22
ListenAddress 0.0.0.0
ListenAddress ::
PermitRootLogin yes
PasswordAuthentication yes

查看服务进程是否启动

[root@localhost ~]# ps -e | grep sshd
  581 ?        00:00:00 sshd
  617 ?        00:00:00 sshd

查看端口22是否监听

[root@localhost ~]# netstat -an | grep 22
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0     36 192.168.0.106:22        192.168.0.119:51292     ESTABLISHED
tcp6       0      0 :::22                   :::*                    LISTEN

服务启动、重启和停止

[root@localhost ~]# service sshd start
Redirecting to /bin/systemctl start sshd.service
[root@localhost ~]# service sshd restart
Redirecting to /bin/systemctl restart sshd.service
[root@localhost ~]# service sshd stop
Redirecting to /bin/systemctl stop sshd.service

附文:

镜像下载

镜像下载页面地址

镜像文件下载地址

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值