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]

The tag has no usage guidance.

0
votes
0answers
17 views

autossh creating many processes every time

I'm using autossh to connect to a reverse SSH tunnel. I run it from startup. However, I was facing problems in that the tunnel sometimes goes down. I created a script which checks if the tunnel is ...
1
vote
1answer
42 views

(root) Warning: Identity file /dev/fd/62 not accessible: No such file or directory

Very similar to Failed to open config file '/dev/fd/63', error: No such file or directory for wpa_supplicant except for the fact that I am running as root. bash-4.4# autossh -v -M 0 -4 -o ...
0
votes
0answers
49 views

how to close/reuse ssh LocalForward ports

I need to ssh to multiple hosts having this configuration: Protocol 2 ExitOnForwardFailure yes ServerAliveCountMax 1 ServerAliveInterval 3 TCPKeepAlive no ControlMaster auto ControlPath ~/.ssh/...
0
votes
2answers
44 views

Creating persistent netcat link

I have a remote raspberrypi that uses autossh to connect to my local machine (with reverse tunnel -R). This should feed a dump1090 instance on my local machine. I'm using /bin/nc localhost 40005 | /...
0
votes
1answer
106 views

Reverse tunnel with autossh exits with 255

It seems since autossh changed their syntax, I am a bit overstrained in establishing a reverse ssh tunnel via autossh with my server. This is the script I am trying to run: autossh -M 20000 -f -N -R ...
2
votes
0answers
105 views

launch reverse tunnel on init with autossh in the background

I need an init script which will establish a reverse tunnel connection to a server. I've come up with the following start script: #! /bin/sh ### BEGIN INIT INFO ### END INIT INFO case "$1" in ...
1
vote
1answer
209 views

launch reverse tunnel with autossh on bootup in Ubuntu

I would like to launch a ssh reverse tunnel on system launch. The following line let's me establish the tunnel fine - but I end up being logged into server which I don't want, especially not from an ...
0
votes
0answers
51 views

`autossh` re-establishes the tunnel without port forwarding

I launched an autossh tunnel between a Raspberry PI and a VPS and it works. I'm testing whether it's reliable after the RPI internet connection drops and reestablishes. What I did Created an ~/.ssh/...
1
vote
0answers
50 views

Automating autossh?

Adding ControlMaster auto ControlPath ~/.ssh/sockets/%C ControlPersist yes to ~/.ssh/config automatically creates a control connection that stays alive for a long time. This works at home where ...
0
votes
1answer
363 views

Setting autossh tunnels

We have server with installed autossh Number of tunnels approximately 20 Today we add new tunnel, but it doesn't work. If we switch positioning of user@server.com and user@servernew.com, the one ...
5
votes
1answer
450 views

Is autossh redundant with systemd?

When creating a persistent reverse SSH tunnel, is autossh useful on a system running systemd? Typically, autossh is run by a service with the option -M set to zero which disables monitoring of the ...
4
votes
2answers
421 views

AutoSSH cannot resolve hostname directly after boot

I want to set up a tunnel to my home server which will be established right after my machine boots. Using this answer, I've got my autossh command set up inside a service, which has been set to run at ...
1
vote
0answers
388 views

systemd: autossh service active but ssh exited with error

#/lib/systemd/system/autossh.service [Unit] Description=Auto Reverse SSH Requires=systemd-networkd-wait-online.service After=systemd-networkd-wait-online.service [Service] Type=forking ExecStart=/...
1
vote
0answers
103 views

autossh wrapper for reliability

There are a few servers spread around the globe who reverse ssh into a jumpbox to expose certain ports. The autossh process is usually evoked on these boxes at the startup using rc.local Here are the ...
0
votes
1answer
1k views

Reverse SSH tunnel with AutoSSH

How to apply dynamic port allocation in AutoSSH? In the remote device using ssh we make a reverse tunnel by this command: ssh -f -N -R 0:localhost:22 username@ip It allocates a dynamic port on the ...
0
votes
1answer
1k views

autossh not working on rc.local

I configured a reverse ssh tunnel through machines A (local, behind several routers) B (middlemen) and C (remote, the one I'm trying to access A from) After putting all relevant keys on all machines, ...
0
votes
1answer
308 views

Auto-SSH works manually but not in background

I'm running the following script on @reboot cron with root: autossh -f -i /home/pi/.ssh/myRemote.pem -R 2210:localhost:22 ubuntu@server.com When I run manually it works fine but from cron I see it ...
0
votes
0answers
94 views

Why does Autossh work on Ubuntu but not on Antergos?

I'm venturing beyond Ubuntu for the first time, and chose Antergos to ease my way into wider world of Linux. Everything's going pretty smoothly and pacman is becoming familiar, but autossh seems to be ...
4
votes
2answers
4k views

Autossh at boot with systemd

I am trying to start a persistent ssh connection at boot with autossh in systemd, following guides such as this one. When I do so, it connects and then immediately disconnects, with very little ...
2
votes
0answers
558 views

SSH Remote Port Forward Host Passwordless

I have a Remote Port Forward SSH tunnel from the host1 the host0 at port 10022 through: $ autossh -R 10022:localhost:22 host0 With host0 record in the ~/.ssh/config file both at host1 and host0: # ...
3
votes
0answers
496 views

How do I use autossh to set up a no-frills socks proxy?

I use ssh -D 12345 joeuser@somewhere.com to set up dynamic port forwarding via host somewhere.com. I want to switch to using autossh to daemonize the thing and to make sure I don't need to manually ...