How to install Autossh on Linux system

  

Linux users need to access SSH server frequently. Therefore, in order to facilitate our use, many users will install autossh on their own computers, which can help us manage SSH sessions and automatically reconnect. And stop forwarding traffic. So how do you install autossh on our computer? Let Xiaobian teach you now.

Installation:

Debian or Ubuntu system

autossh based foundation libraries have joined the Debian system, so it can be easily installed.

$ sudo apt-get install autossh

Fedora System

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

$ 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 to install.< Br>

$ sudo yum install autossh

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

Arch Linux System

$ sudo pacman -S autossh

Compiling and installing from source on Debian or Ubuntu systems

If you want to use the latest version Autossh, you can compile the source installation yourself

$ 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

Compiling and installing from source code in CentOS, Fedora or RHEL system

After CentOS/RHEL 7, autossh is not a pre-compiled package. So you have to compile and install from source.

$ 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

This is how to install autossh on a Linux system. If you don't know how to install autossh or users interested in autossh, use the above method to install it.

Copyright © Windows knowledge All Rights Reserved