Loading... # 使用方法 ``` cd /root/ apt install -y libz-dev libssl-dev wget http://vip.123pan.cn/1815238395/download/openssh/9.6/openssh_9.6p1_amd64_debian12.deb dpkg -i --force-all openssh_9.6p1_amd64_debian12.deb sed -i 's/Type=notify/Type=simple/' /usr/lib/systemd/system/ssh.service systemctl daemon-reload systemctl enable ssh systemctl restart ssh ``` # 如何编译 ``` # 下载源码 cd /root wget --no-check-certificate "https://mirrors.aliyun.com/openssh/portable/openssh-9.6p1.tar.gz" -O openssh-9.6p1.tar.gz tar xzvf openssh-9.6p1.tar.gz # 安装依赖 apt install -y bzr ubuntu-dev-tools bzr-builddeb debhelper dh-make export PATH=/sbin:$PATH cd /root/openssh-9.6p1 dh_make -e wangyg@sddts.cn -f /root/openssh-9.6p1.tar.gz -n --createorig -y -s # 开始编译 cd /root/openssh-9.6p1/debian apt install -y libz-dev libssl-dev sed -i '40s|/etc|/etc/ssh|' /usr/share/perl5/Debian/Debhelper/Buildsystem/autoconf.pm debuild -uc -us -B # 编译文件 /root/xx.deb ``` # 遇到的问题 ## bzr命令无法使用 在Ubuntu系统中编译的时候,可以使用bzr命令辅助dh_make进行编译前文件处理,但是在Debian下这个bzr并无法加载dh_make使用。所幸可以直接使用dh_make直接进行。 最后修改:2024 年 05 月 11 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏