Questions tagged [autossh]

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

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

The original idea and the mechanism were from rstunnel (Reliable SSH Tunnel). With version 1.2 of autossh the method changed: autossh uses ssh to construct a loop of ssh forwardings (one from local to remote, one from remote to local), and then sends test data that it expects to get back.
(The idea is thanks to Terrence Martin.)

Man page: http://manpages.ubuntu.com/manpages/gutsy/man1/autossh.1.html

32 questions
1
vote
1 answer

autossh quits because ssh (dropbear) can't resolve host

I run autossh on a system which might have internet connectivity or might not. I don't really know when it has a connection but if so I want autossh to establish a ssh tunnel by: autossh -M 2000 -i /etc/dropbear/id_rsa -R 5022:localhost:22 -R…
milkpirate
  • 267
  • 1
  • 18
1
vote
1 answer

How to start the echo service on OSX Mountain Lion to respond to autossh monitoring

I have the following two machines : Machine A. OSX Machine which will act as the SSH server Machine B. An SSH client connecting to the above using autossh autossh allows persistent, self-healing connections to be made and restarts the child ssh…
user3104542
0
votes
1 answer

How to convert the following ssh command to autossh?

My ssh code works fine. But after a while it timed out and shut down, so I thought of switching to autossh. But when I tried the same code in autossh, it doesn't work. How can I adapt this code to autossh? My ssh code: ssh -R443:localhost:443…
0
votes
0 answers

Connect my Raspberry Pi from outside with SSL

I run some server (gitea, registry, nextcloud) local on my Raspberry Pi. Vodafon dont let me connect my Pi from outside so I use a server. On my Pi I use: autossh -M 0 -f -o ConnectTimeout=10 -o ServerAliveInterval=60 -o ServerAliveCountMax=2 -N -R…
0
votes
1 answer

How can i exit, stop, kill autossh if connection timed out, ip, port not exists or response without using ssh and sshd config files?

I run autossh in a script for remote port forwarding and i need to exit, kill, stop the script if connection timed out, ip, port not exists or response, without the using of the ssh, sshd config files, is this possible? No answer, found on…
Z0OM
  • 1
  • 4
  • 18
  • 29
0
votes
0 answers

Autossh docker expose endpoint to host & containers

On a public server, I have an Prometheus exporter setup. This is blocked, intentionally, by a firewall as the information should not be public. From a separate network (my home network with dynamic IP), I wish to scrape the Prometheus exporter. The…
Jacob
  • 3,521
  • 6
  • 26
  • 34
0
votes
1 answer

autossh tunnel getting killed after 10 minutes

I have an autossh tunnel set up over which I am sending something that needs an uninterrupted connection for a couple dozen minutes. However, I noticed that every 10 minutes the SSH tunnel managed by autossh is killed and recreated. This is not due…
Martin Melka
  • 7,177
  • 16
  • 79
  • 138
0
votes
1 answer

How to use autossh with google compute (`gcloud compute ssh`)

I would like to use autossh instead of the ssh command run by google cloud while doing gcloud compute ssh --zone myzone --project myproject mymachine What is the command line to replace it?
Jeremy Cochoy
  • 2,480
  • 2
  • 24
  • 39
0
votes
1 answer

Why does autossh spawn dozens of instances of itself and ssh?

I'm running autossh on a Mac (Mavericks) from a bash shell script controlled by launchd. Unfortunately, they way I've set this up causes autossh to spawn dozens of instances of both itself and ssh. Eventually the shell seems to grind to a halt and…
Buadhai
  • 196
  • 3
  • 13
0
votes
1 answer

Autossh bind errors on distributed downloading system

I've set up a distributed system with multiple spring boot downloaders running on digital ocean droplets connecting to a database over an autossh tunnel as follows to connect to mysql database. autossh -M 20000 -f root@xx.xx.xx.xx -L…
conteh
  • 1,544
  • 1
  • 17
  • 39
0
votes
0 answers

Setting autossh tunnels

We have server with installed autossh Number of tunnels approximately 20 Today we add new tunnel, but not work. If change new tunnel instead previous the a new tunnel works, and previous there is no. For example -o GatewayPorts…
useresxi
  • 9
  • 2
0
votes
1 answer

Autossh not accepting logfile option for ssh

autossh -M 10984 -v -o "PubkeyAuthentication=yes" -o "PasswordAuthentication=no" -R 6889:localhost:22 user@rpi.local The above command works. The one below doesn't. autossh -M 10984 -E /home/pi/ssh.log -v -o "PubkeyAuthentication=yes" -o…
mbtamuli
  • 697
  • 1
  • 7
  • 19
0
votes
2 answers

autossh not working when executed in python

I am trying to create ssh reverse tunnel. When I run the below command on terminal it works greate: autossh -M 10876 -N -f -o PubkeyAuthentication=yes -o PasswordAuthentication=no -i /root/.ssh/id_rsa -R 6666:localhost:22 root@**.**.**.** -p…
Mehrdad
  • 708
  • 1
  • 17
  • 38
0
votes
0 answers

MySQL SSH Tunnel Breaking

I have autossh setup to make and reestablish a tunnel with a remote host. The application is MySQL. There is a script which runs which checks local and remote tables and if there is a mismatch, it will pull new entries from the remote table into the…
Kinnara
  • 119
  • 1
  • 7
0
votes
1 answer

CentOS with AutoSSH 127.0.0.1 versus *

I'm using autossh and set it up like shown in the following example: http://surniaulula.com/2012/12/10/autossh-startup-script-for-multiple-tunnels/ I found it works really well, but need some clarification. Particularly, the difference between…
James Oravec
  • 19,579
  • 27
  • 94
  • 160