目录
前言
OpenSSH提供了程序在运行时可以加载和使用的动态库,它提供了加密的网络服务,允许安全地访问远程系统。
一、openssh下载网址
二、openssh交叉编译
1.预配置链接openssl zlib库
./configure --host=aarch64-openwrt-linux --prefix=/ \
--with-libs --with-zlib=/zlib \
--with-ssl-dir=/openssl \
CFLAGS=-I/zlib
2.编译
设置依赖
openssh-9.5p1/Makefile:Makefile
执行./configure
make -j4 -C openssh-9.5p1 -I /zlib
#编译生成的ssh可执行文件,拷贝至目的路径
cp -f $(shell pwd)/openssh-9.5p1/ssh target/bin
总结
获取到ssh可执行文件后,执行ssh ip、弹出请输入密码,完成后即可登入root@ip。