美文网首页
树莓派起步--网络设置

树莓派起步--网络设置

作者: keepWhat | 来源:发表于2018-05-14 17:38 被阅读0次

SSH 配置

sudo vim /etc/ssh/sshd_config

一些配置项:

  • 设置端口


    image.png
  • 允许使用密码登录


    image.png
  • 不允许root用户登录


    image.png

设置静态ip

设置静态ip地址的目的是使得树莓派在每次启动后使用同一个ip地址,通过ssh连接时就能免去更改ip的麻烦

在Ubuntu里面设置静态ip地址是通过修改/etc/network/interfaces文件, 在树莓派中打开此文件发现:
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
看来要修改/etc/dhcpcd.conf文件

interface eth0
static ip_address=172.20.62.63/16
#static ip6_address=fd51:42f8:caae:d92e::ff/64
static routers=172.20.255.254
static domain_name_servers=xx.xx.64.68

相关文章

网友评论

      本文标题:树莓派起步--网络设置

      本文链接:https://www.haomeiwen.com/subject/wjpjdftx.html