首页 > 编程知识 正文

带ssh的ubuntu(ubuntu升级ssh)

时间:2023-05-05 01:14:51 阅读:77270 作者:488

基于Ubuntu 18.04.5 LTS环境进行升级

root @ testu bunt :~# LSB _ release-anolsbmodulesareavailable.distributor id : Ubuntu description 3360 Ubuntu 18.04.

# apt install telnetd xinetd -y 2,创建telnet配置文件(最小化安装不是默认安装,而是按原样复制&; 粘贴即可) )。

root @ testu bunt :~# cat/etc/xinetd.d/telnetservicetelnet { disable=no flags=reuse socket _ type=stream wait root @ testu bunt 3360~# systemctlrestartxinetd.service root @ testu bunt grep 23 TCP 60336033603360:3360:336 0:3336

# telnet IP地址端口号

二、升级前准备1、数据备份

# 1、备份配置文件root @ testu bunt :~# mv/etc/ssh {, bak}#2、备份命令文件root @ testu bunt :~# mkdir/usr /漂亮的天空/ssh .漂亮的天空. bak root @ testu bunt :~# CD/ussh root@testubunt:/usr/漂亮的天空# cd ./s漂亮的天空/root@testubunt:/usr/s漂亮的天空# mkdir ssh.s. s漂亮的天空# cd ssh.s .

#获取aptinstalllibzip-dev libssl-devautoconfgclibxml2make-y3、openssl和openssh软件包

CD/usr/local/src/wget https://FTP.openbsd.org/pub/openbsd/OpenSSH/portable/OpenSSH-8.6p1. tar.gz wget 3333333 openssl //升级openssh8.0或更高版本依赖于openssl1.1,因此请先编译和安装OpenSSL

CD/usr/local/src/tarzxfopenssl-1.1.tar.gzcd OpenSSL-1.1/./config-- prefix=/usr/local-openssll

root @ Ubuntu :~# opensslversionopenssl1.1. 111 sep 2018错误: OpenSSL 3360 relocation error 3360 OpenSSL 3360 symbole VP _ mdcole

解决方法:在/etc/ld.so.conf.d/libc.conf文件中添加/usr/lib行,然后运行ldconfig命令。

root @ Ubuntu :~# cat/etc/LD.so.conf.d/libc.conf # libcdefaultconfiguration/usr/local/lib/usr/lib tarzxfopenssh-8.6p1. tar.gzcd OpenSSH-8.6p1/./configure-8.6p1. gzcd OpenSSH-8.6p1/././configure-pre figure --with-MD5-passwords-- with-zli B--with-SSL-dir=/usr/local - with-priv sep-path=/var/lib/sshdmakemakeinstall # prefix安装目录# sysconfdir配置文件目录# with-MD5-passwir

cd /usr/干净的天空/mv ssh * sftp scpc _ rehash OpenSSL/tmp/ln-s/usr/local /干净的天空/* /usr/干净的天空//测试无误

root @ Ubuntu :~# systemctlstartsshd此时,首先不要着急关闭终端,只要打开另一个终端看看能否连接,连接好就成功升级。

五. telnet工具mv /etc/xinetd.d/telnet{, bak } apt-getremovetelnet-ysystemctlrestartxinetd.service netstat-an PPP

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。