树莓派---Ubuntu通过ssh远程连接树莓派

树莓派---Ubuntu通过ssh远程连接树莓派

  • 注意
  • 一. 方案
  • 二. Ubuntu开启shh功能
  • 三. 树莓派
    •   3.1 查询树莓派 IP 地址(有线连接)
    •   3.2 开启ssh功能
  • 四. 连接成功

注意

   系统: Ubuntu16.04
   树莓派:树莓派3 B+型,树莓派系统:raspbian,默认的用户名:pi,默认密码:raspberry

一. 方案

 ubuntu系统 :  开启shh功能

 树莓派系统 : 开启shh功能,获取IP地址 (分有线和无线),我采用的是有线联网,再配置树莓派为固定的IP地址
            (这样每次连接树莓派的时候,不需要重新去查询树莓派的IP地址)
            
 连接 :在Ubuntu终端:  ssh  pi@ip地址

二. Ubuntu开启shh功能

  命令:

sudo apt-get install openssh-client

在这里插入图片描述

三. 树莓派

  3.1 查询树莓派 IP 地址(有线连接)

      命令:

ifconfig

e关于固定树莓派IP地址的方法,见博主后续更新
在这里插入图片描述

  3.2 开启ssh功能

命令:

sudo raspi-config

在这里插入图片描述
使能SSH
在这里插入图片描述

ssh默认是关的,因为存在安全隐患,初次开启SSH服务时需要更改密码:如下为原文
SSH is enabled and the default password for the ‘pi’ user has not been changed.
This is a security risk - please login as the ‘pi’ user and type ‘passwd’ to set a new password.

按要求修改用户密码后重启就可以
命令:

sudo passwd pi                    #修改 Pi 密码 

四. 连接成功

在Ubuntu终端输入命令:

ssh pi@树莓派ip地址

再输入用户密码
在这里插入图片描述

你可能感兴趣的:(树莓派)