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 INFO
PATH=/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)" daemon
test -x $DAEMON || exit 0
export SSHD_OOM_ADJUST=-17
if [ -n "$2" ]; then
SSHD_OPTS="$SSHD_OPTS $2"
fi
check_privsep_dir() {
# Create the PrivSep empty dir if necessary
if [ ! -d /var/run/$NAME ]; then
mkdir /var/run/$NAME
chmod 0755 /var/run/$NAME
fi
}
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
case "$1" in
start)
check_privsep_dir
echo -n "Starting $DESC: "
if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON -- $SSHD_OPTS; then
echo "OK."
else
echo "Fail."
fi
;;
stop)
echo -n "Stopping $DESC: "
if start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE; then
echo "OK."
else
echo "Fail."
fi
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $PIDFILE
if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON -- $SSHD_OPTS; then
echo "OK."
else
echo "Fail."
fi
;;
*)
echo -n "Usage: /etc/init.d/S50ssh {start|stop|restart}"
exit 1
;;
esac
exit 0
总结:大致就是这些,把编译出来的东西移植进去后
有bin/sbin/libexe
还有etc/ssh
然后设置sshd_config里面的内容
最后设置init.d开机脚本开机运行ssh即可;
最最主要的是etc/shadow里面设置账户为秘钥登录