Questions tagged [autossh]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
58 views

automatically reset sshfs when it locks up, remount fails unless done manually

i have 2 local dirs on my server mounted on a remote server. Local maintains connections with autossh -M 23 -R 24:localhost:22 user@server While remote mounts with dirs-sshfs.sh sshfs -o reconnect,...
2
votes
1answer
51 views

SSH Tunnel with automatic reconnect and password auth in Docker container

I want to forward a Socks5 proxy using SSH with password authentication inside a Docker container. YES, I know that SSH keys would be better. But since it's not my own server, I'm not able to use keys,...
1
vote
1answer
25 views

autossh system script fails at boot, works on systemctl restart

I am trying to set up an autossh service to forward ports to a remote server when my monitoring server boots. After some finagling, I got a pretty barebones system script working, with one catch. The ...
0
votes
0answers
180 views

How do I make autossh more permanent, i.e. always try again?

I am using autossh (via systemd service manager) to create a permanent reverse ssh tunnel to be able connect to the computer in NAT network behind firewall from outside (I used this tutorial): /usr/...
0
votes
0answers
27 views

autossh configuration for accessing a system in private subnet

Want to set up a proxy to access a system in a private subnet. We have a system A in our Office network. System B and System C are in cloud. System B has a public IP. Need to access System C in Cloud....
-2
votes
1answer
36 views

autossh just does ssh; where is the magic?

I did autossh -L 5901:localhost:5901 general and got just command shell of general machine. Tunneling was working. After I exited the shell, tunnel was closed. What is the difference with just ssh? ...
1
vote
1answer
823 views

Remote port forwarding with autossh from Raspberry PI to VPS in order to access the PI from anywhere on the Internet, why does it work only once?

I am using autossh with remote port forwarding from VPS to Raspberry PI in order to be able to access the PI from anywhere on the Internet, but it works only once. I have a Raspberry PI 2 (Raspbian, ...
1
vote
1answer
107 views

setup consistent tunnel between two hosts wirh dynamic IPs

I would like to setup a constant ssh tunnel between two hosts. Now it becomes tricky as both hosts may change their IPs (not at the same time though). My idea to overcome this is to have two reverse ...
5
votes
5answers
960 views

Autossh fails on startup

I am trying to make autossh set up a reverse tunnel to a server I have at home automatically with systemd. I set up a unit in /etc/systemd/system called autossh.service It all works fine if I start ...
0
votes
0answers
94 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
955 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 ...
1
vote
0answers
299 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
673 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
864 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
227 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
802 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 ...
1
vote
0answers
178 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
691 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 ...
7
votes
3answers
3k 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 ...
2
votes
2answers
1k 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
1k 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
159 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
2k 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 ...
1
vote
1answer
3k 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
639 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
130 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 ...
3
votes
3answers
7k 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
752 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
2answers
2k 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 ...