A
A
Artyom Innokentiev2015-12-03 17:05:40
linux
Artyom Innokentiev, 2015-12-03 17:05:40

How to create a permanent port forwarding over ssh and resume it in case of a break?

The situation is this - there is a hosting with access via ssh remote-ssh-host , it has a MySQL database at remote-mysql-host .
We use forwarding the 3306 port of the remote host to our 3307 port of the local server with the command:

ssh -nNT -L 3307:remote-mysql-host:3306 [email protected]

The goal is to ensure constant port forwarding and resume it in the event of a break.
How to decide?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artyom Innokentiev, 2015-12-03
@artinnok

autossh
script

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question