Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to upgrade openssh in ubuntu14.04.1

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces you how to upgrade openssh in ubuntu14.04.1, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Download the software needed for the upgrade

Zlib-1.2.11.tar.gz openssh-7.5p1.tar.gz openssl-1.0.2l.tar.gz

Second, the old version needs to be uninstalled

# apt-get remove openssl

# apt-get remove openssh-server openssh-client

# apt-get purge openssl

3. Start installation

1. First unpack and install zlib:tar-zxvf zlib-1.2.11.tar.gz, and the zlib directory will be generated under the current directory. Enter the zlib directory, and then. / configure, make, make install, along the way, there is no error prompt, the installation is successful.

2. Install openssl first, be sure to add the-- shared option, otherwise when openssh compiles, you will not find the library of the newly installed openssl and will report an error: the header and library versions of openssl do not match.

# cd / openssl-1.0.2l

#. / configure-prefix=/usr-shared

# make

# make test

# make install

After installation, you can use openssl version-a to check that openssl is installed correctly.

There may be an error when installing here: POD document had syntax errors at / usr/bin/pod2man line 71.

Solution: open the / usr/bin/pod2man configuration file to see if you can comment out line 71 before compiling with # comments

3. Install openssh-server again. The steps are the same as above.

#. / configure-prefix=/usr-sysconfdir=/etc/ssh-with-md5-passwords-with-zlib-with-ssl-dir=/usr/local/openssl-with-privsep-path=/var/lib/sshd-with-pam

# make clean

# make

# make install

Error report in the last step: Privilege separation user sshd does not exist solution: add: sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin to / etc/passwd

Make install compilation and installation is successful again.

Note: if you encounter a library file that cannot be found

Compare the file size of the normal machine and this libcrypto.so.1.0.0, if the file is 0, overwrite it with the normal file (there will be multiple files in the system, distributed in different directories), and if you find that there is something missing compared to the normal machine, copy it to that directory.

4. Start ssh. Ssh is installed by default in the / usr/local/sbin/ directory and starts the ssh service using / usr/local/sbin/sshd, which listens on port 22 by default.

5. Check whether the ssh service is started:

-- View ssh services

# / usr/sbin/sshd-d

# netstat-tnlp | grep: 22

Tcp 0 0 0.0.0.0:22 0.0.0.0: LISTEN 2204/sshd

Tcp 0 0: 22: LISTEN 2204/sshd

# ssh-V

OpenSSH_7.5p1, OpenSSL 1.0.2l 25 May 2017

Finally, if ubuntu is rebooted, sshd will not boot by default, so add boot self-startup.

Sudo vi / etc/rc.local

Before exit 0, add one line:

/ usr/local/sbin/sshd

You can do that, too.

-- set boot self-startup

Cp-p / usr/local/openssh-7.5p1/contrib/redhat/sshd.init / etc/init.d/sshd

Chmod+x / etc/init.d/sshd

Chkconfig-add sshd

Chkconfig sshd on

Chkconfig-list sshd

Appendix:

Uninstall zlib, error handling

Rpm-qa | grep zlib

Zlib-1.2.3-29.el6.x86_64

Rpm-e--nodeps zlib-1.2.3-29.el6.x86_64

Rpm-qa | grep zlib

Rpm:error while loading shared libraries: libz.so.1: cannot open shared objectfile: No such file or directory

-- solution

Ldd/bin/rpm | grep libz.so.1

Libz.so.1 = > not found

Libz.so.1 = > not found

Libz.so.1 = > not found

Libz.so.1 = > not found

Libz.so.1 = > not found

Find /-name libz.so.1

/ lib64/libz.so.1

Ll / lib64/libz.so.1

Lrwxrwxrwx.1 root root 13 November 16 2013 / lib64/libz.so.1-> libz.so.1.2.3

Copy the libz.so.1.2.3 from another linux and put it in the / lib64/ directory to create a connection

Cd / lib64/

Ln-slibz.so.1.2.3 libz.so.1

Yum install pam-dev

Therewas a problem importing one of the Python modules

Requiredto run yum. The error leading to this problem was:

Libssl.so.10: cannot open shared objectfile: No such file or directory

Libcrypto.so.10: cannot open shared objectfile: No such file or directory

Solution:

Cd / usr/lib64/

Ln-s libssl.so.1.0.0 libssl.so.10

Ln-s libcrypto.so.1.0.0 libcrypto.so.10

Mount the CD with ISO

Sudo mount / dev/sr0 / mnt

After the command is executed, the feedback "mount: / dev/sr0 is write-protected, mounting read-only" means that the CD is mounted in a read-only manner.

Yum configuration of ubuntu

Ubuntu does not support the yum command, so I tried to install the ubuntu yum command myself. The installation process is as follows (ubuntu version 14.04)

1. First check whether the build-essential package is installed

Apt-get install build-essential

2. Install yum

Apt-get install yum

Ubuntu's own package management

/ etc/apt/sources.list is the configuration file used by the package management tool apt to record the location of the package repository, as well as the files located in / etc/apt/sources.list.d/*.list.

Edit the statements in it

Deb [arch=amd64] http://11.11.177.72:28000 ngiam main

Other external sources

Deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse

Deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse

Deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse

Deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse

Deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

Deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse

Deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse

Deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse

Deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse

Deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

Then save, sudo apt upgrade (update)

There is a permission denied (publickey,password) problem with ssh on ubuntu:

Modify / etc/ssh/sshd-config file.

Change the PermitRootLogin no to yes

Change PubkeyAuthentication yes to no

AuthorizedKeysFile .ssh / authorized_keys preceded by # masking

Just change PasswordAuthentication no to yes.

Restart sshd: service sshd restart

In fact, this method can not solve the problem of public key, but instead access it by password.

If the password is correct and cannot log in, you can delete / root/.ssh/known_hosts or check whether there is any restriction in sshd_config.

On how to upgrade openssh in ubuntu14.04.1 to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report