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 install autossh under Linux

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

Share

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

This article mainly explains "how to install autossh under Linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install autossh under Linux.

Autossh is an open source tool that helps manage SSH sessions, automatically reconnect, and stop forwarding traffic. Autossh assumes that the target host has set a password-less SSH login so that autossh can reconnect disconnected SSH sessions without user action.

As long as you set up a reverse SSH tunnel or mount a remote SSH-based folder, autossh will come in handy sooner or later. Basically, as long as you need to maintain a SSH session, autossh is definitely useful.

There are many ways to install autossh, a linux distribution, below.

Debian or Ubuntu system

Autossh has been added to the basic library based on the Debian system, so it can be easily installed.

The code is as follows:

$sudo apt-get install autossh

Fedora system

The Fedora library also contains the autossh package, which is installed using yum.

The code is as follows:

$sudo yum install autossh

CentOS or RHEL system

For CentOS/RHEL 6 or earlier, you need to open the third library Repoforge library before you can install it using yum.

The code is as follows:

$sudo yum install autossh

After CentOS/RHEL 7, autossh is no longer in the Repoforge library. You need to compile and install from the source code (example below).

Arch Linux system

The code is as follows:

$sudo pacman-S autossh

Compile and install from source code in Debian or Ubuntu system

If you want to use the latest version of autossh, you can compile the source code and install it yourself.

The code is as follows:

$sudo apt-get install gcc make

$wget http://www.harding.motd.ca/autossh/autossh-1.4e.tgz

$tar-xf autossh-1.4e.tgz

$cd autossh-1.4e

$. / configure

$make

$sudo make install

Compile and install from source code in CentOS, Fedora or RHEL systems

After CentOS/RHEL 7, autossh is no longer a precompiled package. So you have to compile and install from the source code.

The code is as follows:

$sudo yum install wget gcc make

$wget http://www.harding.motd.ca/autossh/autossh-1.4e.tgz

$tar-xf autossh-1.4e.tgz

$cd autossh-1.4e

$. / configure

$make

$sudo make install

At this point, I believe you have a deeper understanding of "how to install autossh under Linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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