Linux系统安装Autossh的方法

  Linux用户都需要经常访问SSH服务器,因此,为了方便我们的使用,不少用户会在自己的电脑上安装autossh,它可以帮助我们管理SSH会话、自动重连和停止转发流量。那么如何在我们的电脑中安装autossh 呢?现在就让小编来教你吧。

Linux系统安装Autossh的方法

  安装方法:

  Debian 或 Ubuntu 系统

  autossh已经加入基于Debian系统的基础库,所以可以很方便的安装。

  $ sudo apt-get install autossh

  Fedora 系统

  Fedora库同样包含autossh包,使用yum安装。

  $ sudo yum install autossh

  CentOS 或 RHEL 系统

  CentOS/RHEL 6 或早期版本, 需要开启第三库Repoforge库, 然后才能使用yum安装.

  $ sudo yum install autossh

  CentOS/RHEL 7以后,autossh 已经不在Repoforge库中. 你需要从源码编译安装(例子在下面)。

  Arch Linux 系统

  $ sudo pacman -S autossh

  Debian 或 Ubuntu 系统中从源码编译安装

  如果你想要使用最新版本的autossh,你可以自己编译源码安装

  $ 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

  CentOS, Fedora 或 RHEL 系统中从源码编译安装

  在CentOS/RHEL 7以后,autossh不在是预编译包。所以你不得不从源码编译安装。

  $ 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

  这就是在Linux系统中安装autossh 的方法了,还不知道如何安装autossh 或者对autossh 感兴趣的用户,就用上面的方法进行安装吧。

未经允许不得转载:系统吧-电脑系统大神 » Linux系统安装Autossh的方法

赞 (0)