1.openssh是允许外部登录的工具
2.真的是很复杂的设备
3.移植分布,怎么得到我们想要的openssh
去网上自己寻找安装包下载;
4.怎么预制进arm主板,把编译出来的openssh放进去
其中除了ssh_config和sshd_config;其他都是秘钥,公钥和私钥;
root账户走的秘钥的修改,不改是默认的rockchip
这里要配置是走密码还是走秘钥;
//S50ssh
#! /bin/sh### BEGIN INIT INFO
# Provides: sshd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: OpenBSD Secure Shell server
### END INIT INFOPATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/bin
NAME=sshd
DESC=sshd
DAEMON=/sbin/$NAME
PIDFILE="/var/run/$NAME/$NAME.pid"#busybox telnetd&
# /etc/init.d/ssh: start and stop the OpenBSD "secure shell(tm)" daemontest -x $DAEMON || exit 0export SSHD_OOM_ADJUST=-17if [ -n "$2" ]; thenSSHD_OPTS="$SSHD_OPTS $2"
ficheck_privsep_dir() {# Create the PrivSep empty dir if necessaryif [ ! -d /var/run/$NAME ]; thenmkdir /var/run/$NAMEchmod 0755 /var/run/$NAMEfi
}export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"case "$1" instart)check_privsep_direcho -n "Starting $DESC: "if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON -- $SSHD_OPTS; thenecho "OK."elseecho "Fail."fi;;stop)echo -n "Stopping $DESC: "if start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE; thenecho "OK."elseecho "Fail."fi;;restart|force-reload)echo -n "Restarting $DESC: "start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $PIDFILEif start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON -- $SSHD_OPTS; thenecho "OK."elseecho "Fail."fi;;*)echo -n "Usage: /etc/init.d/S50ssh {start|stop|restart}"exit 1;;
esacexit 0
总结:大致就是这些,把编译出来的东西移植进去后
有bin/sbin/libexe
还有etc/ssh
然后设置sshd_config里面的内容
最后设置init.d开机脚本开机运行ssh即可;
最最主要的是etc/shadow里面设置账户为秘钥登录