A program to start, monitor and automatically restart SSH sessions.
Questions tagged [autossh]
11 questions
21
votes
2 answers
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 automatically on startup so I can ssh in.
I've tried…
ptf
- 333
14
votes
1 answer
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:intranet.example.com:3269 public.example.com…
sorin
- 10,135
10
votes
2 answers
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.
autossh -M 20000 -L 3300:192.168.2.101:3306 -R…
Darkmage
- 271
6
votes
1 answer
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 files and do other important things.
Although not…
Denis
- 337
5
votes
1 answer
Establishing persistent autossh reverse ssh tunnel
Can anyone point me in the direction of a good (step by step) resource for setting up a reverse ssh tunnel with autossh using systemd at boot?
I've tried my best to do this using resources I've found online and have succeeded in manually creating…
space-boots
- 75
4
votes
1 answer
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 so that I can connect when away from home. I'm…
corey_s
- 101
2
votes
0 answers
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 background, then I never get the opportunity to…
Thomas
- 184
0
votes
0 answers
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 could swear it used to!):
autossh -N -q -L…
user447607
- 734
0
votes
1 answer
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 event start on (net-device-up IFACE=eth0)
I've…
Budric
- 1
0
votes
1 answer
SSH into personal office server that is behind multiple routers with a custom ssh port
I have a personal server at my office and I would like to ssh into this Ubuntu 18.04 server. I can't forward ports since I dont have access to the router since its a shared office space. I tried ngrok service, it works but still limited. How else…
Patoshi パトシ
- 3,153
0
votes
1 answer
Exe. path is not absolute (Trying to start a service I created)
I need to get an Ubuntu node to start an autossh tunnel to an SSH server when the node boots.
I have created a service with the following:
' ' ' '
[Unit]
Description=Autossh tunnel at…
Marius
- 23