autossh non inoltro, normale tunnel ssh fa

1

Avvio di autossh in questo modo: autossh -M 5122 -N -R 5432:localhost:5432 <user>@<myhost> , Non riesco a connettermi a localhost: 5432. Se eseguo ssh -f <user>@<myhost> -L 5432:localhost:5432 -N -v -v , posso.

L'output di autossh:

debug1: Local connections to LOCALHOST:5122 forwarded to remote address 127.0.0.1:5122
debug1: Local forwarding listening on ::1 port 5122.
debug2: fd 6 setting O_NONBLOCK
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 5122.
debug2: fd 7 setting O_NONBLOCK
debug1: channel 1: new [port listener]
debug1: Remote connections from LOCALHOST:5122 forwarded to local address 127.0.0.1:5123
debug1: Remote connections from LOCALHOST:5432 forwarded to local address localhost:5432
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: remote forward success for: listen 5122, connect 127.0.0.1:5123
debug1: remote forward success for: listen 5432, connect localhost:5432
debug1: All remote forwarding requests processed

E da ssh:

debug1: Local connections to LOCALHOST:5432 forwarded to remote address localhost:5432
debug1: Local forwarding listening on ::1 port 5432.
debug2: fd 6 setting O_NONBLOCK
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 5432.
debug2: fd 7 setting O_NONBLOCK
debug1: channel 1: new [port listener]
debug1: Requesting [email protected]
debug1: forking to background
debug1: Entering interactive session.

Ho appena iniziato a giocare con ssh tunneling e non riesco a capire perché autossh inoltrerà solo la porta 5122.

    
posta Lander 29.05.2014 - 04:41
fonte

1 risposta

1

Un po 'in ritardo per rispondere, ma forse aiuta ancora qualcuno.

Ho avuto lo stesso problema, risulta che è necessario utilizzare -L anziché -R:

autossh -M 5122 -L 5432:localhost:5432 <user>@<myhost>
    
risposta data 11.03.2015 - 09:54
fonte

Leggi altre domande sui tag