Questions tagged [autossh]
The autossh tag has no summary.
35 questions
1
vote
1
answer
99
views
Remote journal over AutoSSH tunnel
I'm having several remote sites (test setups), each having multiple Linux devices, uploading their journal remotely to Raspberry Pis in that remote site. I'm trying to forward these journals via ...
0
votes
2
answers
736
views
Can a SSH reverse tunnel accept non-local connections?
I have a server in my office behind a firewall, a home server behind NAT, and a laptop I carry around. Sometimes I want to reach the office server from home so I did the following setup.
Home router ...
1
vote
1
answer
1k
views
Start a service and Run/load a script with ssh or autossh, remote port forwarding in the background "-f" to execute more/next commands in the script!
My config:
debian 10.9
4.19.0-19-amd64
OpenSSH_7.9p1 Debian-10+deb10u2, OpenSSL 1.1.1d 10 Sep 2019
autossh 1.4g
GNU bash, 5.0.3(1)-release (x86_64-pc-linux-gnu)
I start a service in /etc/systemd/...
0
votes
1
answer
979
views
autossh always exits in error
I've aliased ssh to autossh -M0 for convenience, and it works well.
However it always exits in error, which causes problems with my scripts.
e.g.
ssh me@myserver 'true' # equivalent to: autossh -...
1
vote
1
answer
711
views
Autossh is not working the same locally than on a remote server
If I start autossh on my local machine as follow:
autossh -M 20000 -f - nNT -L 192.168.144.1:5433:127.0.0.1:5432 remote-user@remote-server-B
it automatically launches the following ssh command under ...
1
vote
1
answer
1k
views
Autossh options not consistent with what is in its man page?
I have kind of a naive question, but by reading this thread for example: https://superuser.com/questions/37738/how-to-reliably-keep-an-ssh-tunnel-open
One can see in the accepted answer how to use ...
1
vote
1
answer
946
views
ssh reverse tunnel works, autossh does not
I have to access an openvpn-vpn server behind a firewall, so to do this I use an ssh-reverse tunnel. While using the "normal" ssh command works, connecting via autossh does not. For all the ...
1
vote
0
answers
2k
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,...
3
votes
1
answer
3k
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
1
answer
618
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
0
answers
222
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....
-1
votes
1
answer
806
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
1
answer
1k
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
1
answer
387
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
5
answers
3k
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 ...