树莓派备忘录(序)系统准备

本文档详述了树莓派的系统准备,包括官方下载地址、使用Win32 Disk Imager烧录系统、开启SSH、安装xrdp和tightvncserver以实现远程桌面。还介绍了无显示器时通过ServerAuditor手机连接,以及如何解锁root用户、更换软件源、解决SSH算法协商失败问题和允许远程root登录。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

系统官方下载地址

https://www.raspberrypi.org/downloads/

烧录工具

https://sourceforge.net/projects/win32diskimager/

 

无显示器时,tf卡内创建一个名为ssh无后缀的文件用于开启ssh

ssh连接工具略

手机端连接工具 Serverauditor

远程桌面需要

sudo apt-get install xrdp

sudo apt-get install tightvncserver

 

pi zero时无网口  需要linux系统下修改wifi配置   见wifi配置

pi zero两个micro usb比较近 otg最好选线而非转接头

 

解锁root用户

pi用户默认密码raspberry

输入命令

sudo passwd root

设置密码

然后输入命令

sudo passwd --unlock root

 

apt-get换源

编辑 /etc/apt/sources.list 文件

以清华源举例

deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main non-free contrib
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ jessie main non-free contrib

中国科学技术大学
Raspbian http://mirrors.ustc.edu.cn/raspbian/raspbian/

阿里云
Raspbian http://mirrors.aliyun.com/raspbian/raspbian/

清华大学
Raspbian http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/

华中科技大学
Raspbian http://mirrors.hustunique.com/raspbian/raspbian/
Arch Linux ARM http://mirrors.hustunique.com/archlinuxarm/

华南农业大学(华南用户)
Raspbian http://mirrors.scau.edu.cn/raspbian/

大连东软信息学院源(北方用户)
Raspbian http://mirrors.neusoft.edu.cn/raspbian/raspbian/

重庆大学源(中西部用户)
Raspbian http://mirrors.cqu.edu.cn/Raspbian/raspbian/

新加坡国立大学
Raspbian http://mirror.nus.edu.sg/raspbian/raspbian

牛津大学
Raspbian http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian/

韩国KAIST大学
Raspbian http://ftp.kaist.ac.kr/raspbian/raspbian/

 

更新软件源数据   apt-get update

更新已安装软件   apt-get upgrade

 

ssh问题

algorithm negotiation failed错误

编辑  /etc/ssh/sshd_config

增加如下代码

Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc

MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-sha1-96,hmac-md5-96

KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,curve25519-sha256@libssh.org

重启服务 service ssh restart

导致此问题的原因是ssh升级后,为了安全,默认不再采用原来一些加密算法,我们手工添加进去即可。

 

 

远程root登录问题

编辑  /etc/ssh/sshd_config

修改 PermitRootLogin without-password 为 PermitRootLogin yes

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值