Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [autossh]

A program to start, monitor and automatically restart SSH sessions.

0
votes
0answers
65 views

Autossh after powerfailuer

In the case of autossh what happens in the following situation: if there is a powercut and on reboot an internet connection is down how does autossh handle when the internet connection returns? The ...
0
votes
0answers
49 views

Why does my autossh connection not resume at boot (init script)

I need to re-establish a ssh reverse tunnel to a achine in a restricted network on boot. I wrote an init scripttha looks like: #! /bin/sh ### BEGIN INIT INFO ### END INIT INFO case "$1" in start) ...
13
votes
1answer
8k views

Start autossh on system startup

Is there any way to start autossh on startup, so that it starts and sets up the ssh tunnel before a user has even logged in? I boot Ubuntu to terminal, and I'd like that the autossh process starts ...
6
votes
1answer
761 views

Making a crontab reversed SSH connection using script

I have a PC behind a NAT which makes a reversed SSH connection to my Digitalocean VPC. I utilise this reversed SSH connection from home to login to my office PC (I am authorised to do so) and copy ...
0
votes
0answers
406 views

What's wrong with my autossh tunnel?

This is my synergy tunnel between my desktop and my laptop. Both are Ubuntu 14.04 LTS. Note that localhost is the desktop. This works: ssh -N -f -L 24800:localhost:24800 laptop This doesn't (I ...
2
votes
0answers
268 views

Autossh fork after entering password

I have an SSH tunnel that I run with autossh to keep it going reliably. The only issue I have is that I have an encrypted private key which I use to connect. If I want to fork my process to the ...
2
votes
1answer
888 views

autossh forwarded ports left open on connection failure

I am trying to establish a reverse SSH tunnel from my home network. I've got it so that autossh connects successfully once (and only once) per reboot. I'm forwarding remote ports to my local machine ...
12
votes
1answer
2k views

How to prevent autossh from becoming stuck once in a while?

I am using autossh to build a reverse ssh tunnel but from time to time the tunnel stops working and I need to kill autossh and start it again. /etc/cron.d/autossh @reboot autossh -f -nNT -R 3269:...
0
votes
1answer
2k views

AutoSSH for a robust tunnel

I'm trying to start an ssh tunnel from A to B and have it run despite things like: period network/wifi drops on A and remote server reboot on B. My ssh tunnel starts using upstart script on A with ...
9
votes
2answers
14k views

connecting a SSH tunnel on reboot?

How can i reestablish a Tunnel if my localhost goes down? i have 2 machines, Remotehost and localhost, on my localhost im running autossh to keep the tunnel alive in case of network problems. ...