• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to install Autossh on Ubuntu 16.04

1449

How to install Autossh on Ubuntu 16.04

The Autossh is a program to start a copy of SSH sessions and monitoring it or restarting it, should the session die and stop the passing traffic. The autossh uses the SSH to construct a loop of SSH forwardings and then sends the test data that it expects to get back. This tutorial explains the installation procedure of Autossh on Ubuntu.

Installation procedure

To start the installation procedure, first add the repo and execute the following command.

root@linuxhelp1:~# add-apt-repository ppa:eugenesan/ppa
 This repository contains collection of customized, updated, ported and backported
packages for two last LTS releases and latest pre-LTS release.
Packages for older releases relocated to ppa:eugenesan/archive or deleted.

+-------------------------------------------------------------------------------------+
| Disclaimer:
+-------------------------------------------------------------------------------------+
* Packages in this a nd related PPAs are for personal use only.
  They developed specifically for several custom environments and may not work for you.
* Usage of packages in this PPA, in some forms, might contradict licenses of software
  packaged in this and related PPAs. End users and administrator are responsible for
  runtime licensing and possible legal consequences.
* Some packages provided with their dependencies while some might require additional
  Ubuntu repositories and external PPAs. Below is the list of

+-------------------------------------------------------------------------------------+
| To add this repository, to your Ubuntu installation, invoke:
+-------------------------------------------------------------------------------------+
$ sudo add-apt-repository ppa:eugenesan/ppa
.
.
.
gpg: keyring `/tmp/tmp6jp7grtr/secring.gpg'  created
gpg: keyring `/tmp/tmp6jp7grtr/pubring.gpg'  created
gpg: requesting key 8313A596 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp6jp7grtr/trustdb.gpg: trustdb created
gpg: key 8313A596: public key " Launchpad synergy+"  imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK

The repositories is added successfully. Now update the repo of the target system by running the following command.

root@linuxhelp1:~# apt-get update
Hit:1 http://in.archive.ubuntu.com/ubuntu xenial InRelease          
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Get:3 http://ppa.launchpad.net/eugenesan/ppa/ubuntu xenial InRelease [17.5 kB]                          
Get:4 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]                                        
Get:5 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]                                        
Get:6 http://ppa.launchpad.net/eugenesan/ppa/ubuntu xenial/main amd64 Packages [40.6 kB]             
Get:7 http://ppa.launchpad.net/eugenesan/ppa/ubuntu xenial/main i386 Packages [40.5 kB]             
Get:8 http://ppa.launchpad.net/eugenesan/ppa/ubuntu xenial/main Translation-en [24.7 kB]                                            
Fetched 430 kB in 8s (52.4 kB/s)                                                                                                    
Reading package lists... Done

The system is updated with the repositories. Then install the Autossh package by executing the apt-get install command and press y to continue with the installation.

root@linuxhelp1:~# apt-get install autossh -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  autossh
0 upgraded, 1 newly installed, 0 to remove and 480 not upgraded.
Need to get 27.4 kB of archives.
After this operation, 123 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu xenial/universe amd64 autossh amd64 1.4e-2 [27.4 kB]
Fetched 27.4 kB in 0s (53.7 kB/s)
Selecting previously unselected package autossh.
(Reading database ... 176594 files and directories currently installed.)
Preparing to unpack .../autossh_1.4e-2_amd64.deb ...
Unpacking autossh (1.4e-2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up autossh (1.4e-2) ...


For using the Autossh, execute the following command to list the options that can be used with the Autossh.

root@linuxhelp1:~# autossh 
usage: autossh [-V] [-M monitor_port[:echo_port]] [-f] [SSH_OPTIONS]

    -M specifies monitor port. Overrides the environment
       variable AUTOSSH_PORT. 0 turns monitoring loop off.
       Alternatively, a port for an echo service on the remote
       machine may be specified. (Normally port 7.)
    -f run in background (autossh handles this, and does not
       pass it to ssh.)
    -V print autossh version and exit.

Environment variables are:
    AUTOSSH_GATETIME    - how long must an ssh session be established
                          before we decide it really was established
                          (in seconds). Default is 30 seconds  use of -f
                          flag sets this to 0.
    AUTOSSH_LOGFILE     - file to log to (default is to use the syslog
                          facility)
    AUTOSSH_LOGLEVEL    - level of log verbosity
    AUTOSSH_MAXLIFETIME - set the maximum time to live (seconds)
    AUTOSSH_MAXSTART    - max times to restart (default is no limit)
    AUTOSSH_MESSAGE     - message to append to echo string (max 64 bytes)
    AUTOSSH_PATH        - path to ssh if not default
    AUTOSSH_PIDFILE     - write pid to this file
    AUTOSSH_POLL        - how often to check the connection (seconds)
    AUTOSSH_FIRST_POLL  - time before first connection check (seconds)
    AUTOSSH_PORT        - port to use for monitor connection
    AUTOSSH_DEBUG       - turn logging to maximum verbosity and log to
                          Stderr


To remove the Autossh, execute the following command and press y to continue with the uninstallation.

root@linuxhelp1:~# apt-get remove autossh -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  autossh
0 upgraded, 0 newly installed, 1 to remove and 480 not upgraded.
After this operation, 123 kB disk space will be freed.
(Reading database ... 176614 files and directories currently installed.)
Removing autossh (1.4e-2) ...
Processing triggers for man-db (2.7.5-1) ...

Wasn' t that an easy installation procedure? The Autossh tries to avoid congestion in the traffic by making sure all the port numbers on the remote machines does not collide.

Tags:
jacob
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

How to unmerge the autossh in ubuntu?

A

use the following command to unmerge the autossh in ubuntu # emerge --ask --unmerge net-misc/autossh

Q

What is AutoSSH?

A

Autossh is a program to start a copy of ssh and monitor it, restarting it as necessary should it die or stop passing traffic.

Q

How to AutoSSH during boot with systemd?

A

If you want a permanent SSH tunnel already created during boot time, you will (nowadays) have to create a systemd service and enable it. There is however an important thing to note about syst

Q

how to add the repo of Autossh on ubuntu?

A

add the repo and execute the following command.
# add-apt-repository ppa:eugenesan/ppa

Q

where to run the autossh in ubuntu?

A

execute the following command to list the options that can be used with the Autossh.
# autossh

Related Tutorials in How to install Autossh on Ubuntu 16.04

Related Tutorials in How to install Autossh on Ubuntu 16.04

How to install Meld tool in Ubuntu
How to install Meld tool in Ubuntu
Feb 25, 2017
How to install Dconf-Editor on Ubuntu 18.04
How to install Dconf-Editor on Ubuntu 18.04
Jul 14, 2018
How to install and update OpenSSL on Ubuntu 16.04
How to install and update OpenSSL on Ubuntu 16.04
Mar 9, 2017
How to install GLib 2.0 on Ubuntu 17.04
How to install GLib 2.0 on Ubuntu 17.04
May 22, 2017
How to Install Android Emulator on Ubuntu 20.4.1
How to Install Android Emulator on Ubuntu 20.4.1
Jul 13, 2021
How To Install AnyDesk on Ubuntu 16.04
How To Install AnyDesk on Ubuntu 16.04
Apr 4, 2018
How to install Genymotion 2.12.1 on Ubuntu 18.04
How to install Genymotion 2.12.1 on Ubuntu 18.04
Jul 9, 2018
How to install Timeshift 18.4 on Ubuntu 18.04
How to install Timeshift 18.4 on Ubuntu 18.04
Jul 6, 2018

Related Forums in How to install Autossh on Ubuntu 16.04

Related Forums in How to install Autossh on Ubuntu 16.04

Ubuntu
matthew class=
Failed to enable unit: Refusing to operate on linked unit file sshd.service
Apr 15, 2019
Ubuntu
mason class=
Passwd: You may not view or modify password information for root On Ubuntu 19.04
May 27, 2019
Ubuntu
isaac class=
/etc/apt/sources.list Permission denied
May 18, 2017
Ubuntu
yousuf class=
lsb_release command not working : Debian
Jan 18, 2018
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Ubuntu
mason class=
"E: Package 'php-mcrypt' has no installation candidate" error on Ubuntu 20.4.1
Mar 15, 2021
NFS
luke class=
clnt_create: RPC: Program not registered
Apr 25, 2017
Apache
isaac class=
How to disable apache welcome page on Ubuntu
Dec 15, 2018

Related News in How to install Autossh on Ubuntu 16.04

Related News in How to install Autossh on Ubuntu 16.04

How To Install Mixxx on Ubuntu 16.04
How To Install Mixxx on Ubuntu 16.04
Oct 11, 2017
Ubuntu 17.04 released with greater expectations
Ubuntu 17.04 released with greater expectations
Apr 15, 2017
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Ubuntu Core now available on i.MX6 based TS-4900 thanks to Technologic Systems Inc.
Mar 1, 2017
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Ubuntu 17.10 Artful Aardvark Beta 1 is now here. Download Now
Sep 2, 2017
Ubuntu Unity is no more: One Linux dream has been axed
Ubuntu Unity is no more: One Linux dream has been axed
Apr 7, 2017
What’s next for Ubuntu Linux Desktop?
What’s next for Ubuntu Linux Desktop?
Apr 11, 2017
Say Hi to Ubuntu's new mascot
Say Hi to Ubuntu's new mascot
Mar 22, 2019
KDE Connect App was removed from Google Play Store and brought back in 24 hours
KDE Connect App was removed from Google Play Store and brought back in 24 hours
Mar 22, 2019
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Sebastian ?
How to change non required to required field in SuiteCRM Custom/Default Modules

How to change not required to the required field in SuiteCRM Custom/Default Modules?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.