tutorial on installing AUTOSSH under Linux

Source: Internet
Author: User
Tags ssh centos free ssh arch linux

Autossh is an open source tool that can help manage SSH sessions, automatically connect and stop forwarding traffic. Autossh will assume that the target host has set up a password-free SSH login so that autossh can connect to the disconnected SSH session without user action.

As long as you build a reverse SSH tunnel or mount an SSH-based remote folder, AUTOSSH will come in handy sooner or later. Basically, Autossh is certainly useful as long as you need to maintain an SSH session.

There are many installation methods for Linux distribution autossh below.

Debian or Ubuntu Systems

Autossh has joined the base 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 autossh packages, which are installed using Yum.

The code is as follows:

$ sudo yum install Autossh

CentOS or RHEL system

Centos/rhel 6 or earlier, you need to open the third library Repoforge library before you can use Yum installation.

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 the installation 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 systems

If you want to use the latest version of AUTOSSH, you can compile your own source installation

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

Install from source code in CentOS, Fedora or RHEL system

After Centos/rhel 7, Autossh is not a precompiled package. So you have to compile the installation 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.