When I run an ssh session purely for tunnelling purposes, I start it like this:
ssh -N -L 5432:localhost:5432 user@host &
However, when I do so, about every second keystroke in the terminal where I've done this doesn't work. Other windows are unaffected. What is going on?
Details:
I can't think of anything else that may be relevant, but if there is, let me know.
Запустите его с помощью переключателя -f
, который будет делать то же самое с правильным поведением:
ssh -f -N -L 5432:localhost:5432 user@host
Он автоматически перейдет в фоновый режим после аутентификации или другие шаги, которые могут потребовать интерактивности.