K
K
kajidooto2017-04-18 05:35:13
SSH
kajidooto, 2017-04-18 05:35:13

How to make permanent port forwarding?

I forward the ports like this:
ssh -f [email protected] -L 1234:127.0.0.1:1234 -N
but, I close the terminal and it all resets, then I need to do it again. how to avoid dropping?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Shelemetiev, 2017-04-18
@kajidooto

Try `&` after the command. It puts the command in the background:
`nohup` will help to completely untie from the terminal:

nohup ssh -f [email protected] -L 1234:127.0.0.1:1234 -N &

D
Dmitry, 2017-04-19
@TrueBers

autossh
wiki

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question