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
4
votes
0 answers

Can autossh be used to monitor "ssh -D" local dynamic port forwarding (SOCKS proxy)? If so, how? If not, alternatives?

When I'm teleworking, I need to access some internal web servers. I use ssh -f -N -D 4000 someserver.mywork.com on my home computer to setup local dynamic port forwarding. Then, I configure my web browser to use localhost port 4000 as a SOCKS host,…
Ed Sabol
  • 433
  • 4
  • 15
4
votes
1 answer

Reverse ssh tunnel fails to bind to port when tunnel is torn down and restarted

I have a host that starts a reverse ssh tunnel upon bootup like this: ssh -N -R 2222:localhost:22 root@10.1.2.6 It works great and the reverse tunnel is formed. But whenever I reboot the host, the remote server that the tunnel is built to says…
Tom Freezers
  • 227
  • 3
  • 9
3
votes
2 answers

autossh pid is not equal to the one in pidfile when using start-stop-daemon

I am trying to create a service on my Debian Wheezy system. When trying to use start-stop-daemon to run autossh, the pid contained into the pidfile does not match with the autossh process. $ AUTOSSH_PIDFILE=/var/run/padstunnel.pid $ sudo…
lauhub
  • 894
  • 1
  • 15
  • 27
2
votes
0 answers

Create an reverse proxy with Traefik from a certain endpoint onto a local network port

I'm trying to do a reverse proxy with Traefik, like Nginx. To resume, I would like a proxies requests from a certain endpoint onto a local network port, that happens to be a SSH tunnel with Traefik. Actually it works with Nginx but Would like to…
Matthieu
  • 199
  • 2
  • 3
  • 15
2
votes
1 answer

Create a SSH tunnel from a Jump host to a Database and access the database on Jump Host Port

I am trying to create a SSH tunnel between a database running server port and another server as the following. MySQL:3306 <=====> Server-A:3306 And I want to use the Server-A:3306 as the database URI to connect to the database. I am running the…
diyoda_
  • 5,274
  • 8
  • 57
  • 89
2
votes
0 answers

Cygwin disappeared on its own and messed up my downloads folder permissions (I think)

I am trying to get Autossh to work with Cygwin. I followed this guide loosely: http://tutorialspots.com/how-to-create-ssh-tunnel-on-windows-by-using-autossh-2984.html I managed to get as far as setting up my ssh keys ad ssh'ing into my server. I did…
2
votes
1 answer

Bash Script Runs From Command Line But Not With Launchd

I'm running autossh on a 2010 MBA running Mavericks. The script runs fine and works as expected from the command line, but not when run by launchd. I have tried including PATH in the launchd plist, but that didn't help. Here's the…
Buadhai
  • 196
  • 3
  • 13
2
votes
2 answers

autossh fails with exit status 1 and no error message

I'm trying to run autossh (on a VM running CentOS6), but it's exiting immediately with the help message. I think this is a system issue because when I run it with the exact same parameters on another computer (running Ubuntu 14.04) it works fine.…
Johnny
  • 7,073
  • 9
  • 46
  • 72
2
votes
2 answers

autossh exit when using the -f option

When running autossh without the "-f" option, everything works fine. Adding the "-f" option indeed sends autossh to the background, but after the ssh tunneling established correctly the autossh itself exit, leaving the ssh connection without…
Shay Tsadok
  • 913
  • 1
  • 7
  • 26
1
vote
1 answer

Use docker container as SSH tunnel inside network

I am trying to use a docker container to set up a SSH tunnel to a remote database that is only reachable via SSH. I have a docker network with several containers and want to make the database available for all the containers in the network. The…
Franka
  • 11
  • 3
1
vote
1 answer

Autossh script running as systemctl start SERVICE works but systemctl enable SERVICE failed

We are trying to get autossh to connect to remote server at boot time in Ubuntu 16.04.2. So we use systemctl to do the job. The script is as following: [Unit] Description=Keeps a tunnel to 'remote server'…
Bill Q
  • 47
  • 7
1
vote
1 answer

Debian which repository has the package autossh?

I am trying to install autossh on Debian squeeze, but I am getting error E: Unable to locate package autossh. I don't know which repository the package autossh is present in. I tried searching on the Debian site but couldn't get the repository…
sandy
  • 53
  • 8
1
vote
2 answers

alpine linux -- autossh (missing)

I need to be able to : -- RUN apk add --no-cache autossh for migrating my project into alpine linux from ubuntu I'm getting an error while building the Dockerfile.. any workarounds? I cannot get rid of the autossh requirement as I need this to…
sambehera
  • 959
  • 3
  • 13
  • 33
1
vote
0 answers

systemd autossh.service variables

I want to add a systemd service file for autossh to my system. This skript should ask some viables from a conf-file. This is what I tried until…
1
vote
1 answer

Can I use autossh for gcloud compute ssh?

For some reason ssh doesn't work to set up a tunnel to my Google Compute Engine instance. I have to use gcloud compute ssh. I'd really like to set up a persistent/resilient tunnel, like one gets with autossh. Is there any way I can do so using…
brandones
  • 1,847
  • 2
  • 18
  • 36
1
2 3