Как обновить openssl ubuntu

Обновлено: 07.07.2024

Я использую Debian (Stretch). Здесь openssl version возвращается:

OpenSSL 1.1.0f 25 мая 2017 г. (Библиотека: OpenSSL 1.1.0-pre6-dev xx XXX xxxx)

Как я могу обновить «Библиотеку», используемую для OpenSSL ( 1.1.0-pre6-dev ), до самой последней версии, поскольку apt-get install openssl она, похоже, не помогает?

На другом сервере openssl version возвращает «OpenSSL 1.1.0g 2 ноября 2017 г. (Библиотека: OpenSSL 1.1.0f 25 мая 2017 г.)»: как это возможно, что используемая библиотека версий не совпадает с установленным пакетом?

Обновление 1

apt-cache policy openssl libssl1.1 вывод:

Обновление 2

Похоже, что установлены две версии openssl:

usr/local/ssl/bin/openssl version возвращается OpenSSL 1.0.2h 3 мая 2016

usr/bin/openssl version возвращает OpenSSL 1.1.0f 25 мая 2017 г. (Библиотека: OpenSSL 1.1.0-pre6-dev xx XXX xxxx)

which openssl возвращает / usr / bin / openssl

ldd $(which openssl) возвращается

Вы уверены , что используете Stretch? Что apt-cache policy openssl libssl1.1 выводит? (Пожалуйста, отредактируйте свой вопрос, чтобы добавить информацию.) Stretch имеет только 1.1.0f, но это новее, чем 1.1.0-pre6. Я только что отредактировал вопрос с запрошенным выводом, большое спасибо за вашу помощь Странно . Что делать which openssl и ldd $(which openssl) выводить? Похоже, есть еще одна версия как openssl инструмента, так и libssl библиотеки.

Прежде всего, вы должны удалить локально установленные библиотеки и двоичные файлы ( libcrypto и libssl т. Д., И openssl ). Это гарантирует, что вы используете упакованные версии, которые получают поддержку безопасности.

Дорогой Стефан, большое спасибо за то, что ты продолжил следить за этим вопросом, твои точные ответы поставили меня на правильный путь. Серьезно, спасибо!

Debian Stretch является текущей стабильной версией (по состоянию на ноябрь 2017 года). Команда безопасности передает исправления безопасности в выпущенные версии кода, поэтому, пока вы не получите новые функции, вы можете быть уверены, что ваши библиотеки SSL обновлены.

Какие связанные пакеты установлены или могут быть установлены

Какие версии установленных пакетов доступны в репозиториях

Убедитесь, что все в курсе

Для любого данного пакета вы можете увидеть, какие исправления были применены, прочитав файл Changes в /usr/share/doc//changelog.Debian.gz . Например,

Похоже, вы используете какой-то дистрибутив Linux, что означает, что обновления ваших пакетов зависят от сопровождающих вашего дистрибутива, и вы будете получать новые версии пакетов только тогда, когда упомянутые сопровождающие загружают новые версии в ваш репозиторий дистрибутива (это может также включать обновление до новой версии). версия вашего дистрибутива).

Конечно, вы можете следовать, например, этому руководству (если вы используете Ubuntu / Debian / Mint), чтобы создать новую версию OpenSSL, а затем использовать dpkg для ее установки, но это может привести к печальным последствиям, например, ваши установленные приложения будут либо прекратить соединение с использованием SSL или вообще прекратить работу.

Если вам абсолютно необходимо иметь новую версию OpenSSL, чтобы просто поиграть, вы можете скомпилировать ее из исходников и установить в / usr / local, где она не будет мешать общесистемным пакетам. Это обычно так же просто, как бег

Но в настоящее время это не всегда просто, учитывая существование CMake и других цепочек сборки. В любом случае, многие приложения Linux поставляются с руководством по их сборке.

В популярной библиотеке OpenSSL найдена серьезная уязвимость, которая коснулась огромное количество хостинг-провайдеров. Данная уязвимость позволяет злоумышленнику расшифровать данные передаваемые с помощью SSL/TLS.

Многие хостинг-провайдеры уже обновили OpenSSL на всех своих серверах и закрыли уязвимость, но остается большая доля компаний, которые не настолько серьезно относятся к безопасности.

Если вы используете shared-хостинг, то вам необходимо обратиться к вашему хостинг-провайдеру и узнать какую версию библиотеки OpenSSL они используют на их площадках. Это относится не только к серверу, где непосредственно находится ваш сайт, но и серверы с панелью управления сайтом, биллингом и прочее.

Если же вы работаете с VPS-хостингом или с выделенными серверами, то обновить библиотеку вам скорее всего придется самостоятельно.

Обновление OpenSSL на Ubuntu или Debian Linux

Чтобы обновить библиотеку OpenSSL на Debian Linux, Ubuntu Linux и других дистрибутивах использующие менеджер пакетов apt-get можно с помощью:

Обновленный пакет OpenSSL на Debian Wheezy

Обновленный пакет OpenSSL на Debian Wheezy

После обновления библиотеки вам необходимо вручную перезагрузить некоторые службы, которые используют OpenSSL, например postfix, apache, nginx, sshd, php5-fpm и другие. Чтобы убедиться в том, что ваша версия OpenSSL больше не уязвима, можете уточнить название установленного пакета:

В данном случае видна версия пакета 1.0.1e-2+deb7u6 , это как раз патч для уязвимой версии 1.0.1e в дистрибутиве Debian. Если вы не ставили ограничение на использование только стабильных пакетов Debian, то OpenSSL у вас обновится до версии 1.0.1g. Если вы работаете с дистрибутивами Fedora или CentOS, воспользуйтесь утилитами yum и rpm . Для SUSE Linux используйте zypper .

Константин Ковшенин 10.04.2014 10.04.2014

Подписаться на рассылку

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 4 years ago .

Ubuntu 16.04.2

Please, be informed that I'm a newbie, and the question may be clumsy. I've read some theoretical materials, but don't have enough practice.

Let's suppose, we have a VPS bought from a hoster.

I'm afraid of accessing via ssh a bit. There may be situations when one may spoil everything and can't access (for example organize iptables to deny everything, or just loose one's private key etc.).

Let's suppose that we want to update OpenSSL.

Well, as far as I can understand, we have to download it, extract, configure and make. Then reboot the server to be on the safe side.

What if ssh will not work? So, we rebooted, and can't access. I'm afraid that my hoster will not help me to restore access to the server.

Maybe I should open telnet access in UFW while I'm reinstalling OpenSSL? It's not safe.

Maybe I should pay a bit more money to my ISP for a static IP, organize UFW to allow access via Telnet only from my static IP? It's a bit better.

Can the control panel (like ISP manager) be useful here?

Well, could you tell me what is the right way of updating OpenSSL.

503 4 4 gold badges 6 6 silver badges 11 11 bronze badges

2 Answers 2

First of all, never allow telnetd (telnet server) to listen for connections on a public interface. There's really no reason to ever use it on a modern system. Everything you can accomplish with telnet can be accomplished with SSH, and SSH is secure (connections are only allowed from authenticated clients, and communications are encrypted "on the wire"). Back up your private keys in a secure location.

To update openssl, assuming it's already installed:

sudo apt update && sudo apt install openssl

It really depends on why you are wanting to 'update' OpenSSL. Given that you have a recent LTS version of Ubuntu, ordinarily, all the usual bug fixes/vulnerabilities are ported into the packaged versions of OpenSSL and OpenSSH are handled for you. As such, building OpenSSL from source should be the last option.

In your situation, I would recommend that, unless you are looking for a specific unsupported feature, you use the packages in the Ubuntu package repositories.

In which case, the regular process for carrying out this sort of operation would be to run:

If you know there is a newer version of OpenSSL you are attempting to use, you can simply upgrade that package individually by running:

If this returns 0 packages updated then there were no updates to the packages anyway.

Then look at the packages that Ubuntu wants to upgrade and make a more informed choice. If the package upgrade list looks sensible for what you are needing, then typing Y and enter will allow the upgrade process to proceed.

Of course, the best way to mitigate against the sort of 'I can't gain network access to my box' is to have console access to the box. Unfortunately, without knowing who your provider is, I cannot advise you as to whether that is possible, or by what mechanism you would do it. However, many provisioning systems give you at least some KVM functionality, so it may be possible. You would have to read the documentation from your host as to how to achieve this.

I have Ubuntu 16.04 . It has OpenSSL 1.0.2g . I need to use OpenSSL 1.1.0g . Note that OpenSSL 1.1.0g is installed in my other machine Ubuntu 18 . But I need to run a python program in Ubuntu 16.04 but I need the specific OpenSSL 1.1.0g . I did:

But OpenSSL in my Ubuntu machine did not get updated. How can I update it?

I use python socket, ssl modules to make TLS connection in port 443. Will python automatically recognizes OpenSSL 1.1.0g if I updated the old OpenSSL 1.0.2g to OpenSSL 1.1.0g ?

The reason for upgrading OpenSSL is I need to run python program ssl socket but I need the program to use OpenSSL 1.1.0g .

and checks the OpenSSL version via: openssl version -a I get the old version OpenSSL 1.0.2g

How to get the new version OpenSSL 1.1.0g in my Ubuntu 14.06 machine please?


1,668 9 9 gold badges 33 33 silver badges 60 60 bronze badges

2 Answers 2

Why you couldn't get OpenSSL 1.1.0g working on Ubuntu 16.04 by just updating:

Your Ubuntu 18 has OpenSSL 1.1.0g because the version that is available on its repositories. Sometimes, it has more than one version of a package available on the repository system. But, it looks like Ubuntu 16.04 does not have the version you need available at all. That is why you weren't and you won't be able to get OpenSSL 1.1.0g working on Ubuntu 16.04 by just updating. The version available on the repositories is different.

And how to do it:

You either will need to install it manually or find a repository for Ubuntu 16.04 that make OpenSSL 1.1.0g available on the system. I am not sure there is a repository available, so if you want to install it manually do as it follows:

Warning.: By installing a new version of OpenSSL that is not available in the system, by default, you introduced a version that is not compatible with the updates made available by the maintenance of the system. You will need to take care of it yourself. Maybe, depending on your scenario, it is worth your while just use Ubuntu 18 that has the version of OpenSSL you need by default. It is the easiest and safest way to go.

Читайте также: