-
SSH服务安装
sudo apt-get install openssh-server
-
检查树莓派SSH服务是否开启
ps -e | grep ssh
-
SSH服务开启
sudo /etc/init.d/ssh start
-
配置文件
/etc/ssh/sshd_config
-
开机自动启动
打开/etc/rc.local文件,在语句exit 0之前加入
/etc/init.d/ssh start
-
/etc/ssh/sshd_config配置文件
https://www.jianshu.com/p/1e793e386beb
参数选项 说明
Port 22 SSH 预设使用 22 这个 port,您也可以使用多的 port !
Protocol 2,1 选择的 SSH 协议版本,可以是 1 也可以是 2 ,如果要同时支持两者,就必须要使用 2,1 这个分隔了!
ListenAddress 0.0.0.0 监听的主机适配卡!举个例子来说,如果您有两个 IP,分别是 192.168.0.100 及 192.168.2.20