[clug] Why is my SSH port forwarding failing all of a sudden?

Chris Smart clug at christophersmart.com
Tue Feb 2 11:18:15 UTC 2016

On 02/02/16 13:15, Tony Lewis wrote:
> On 2/02/2016 12:12 PM, Chris Smart wrote:
>> Have you tried to connect with debug messages to see any errors?
>> ssh -vv remote_server_ip
> Yes.  The error message implies the peer is at fault:
> $ ssh -vv user at remotehost
> OpenSSH_7.1p2, OpenSSL 1.0.2f  28 Jan 2016
> debug1: Reading configuration data /home/Tony/.ssh/config
> debug1: /home/Tony/.ssh/config line 1: Applying options for *
> debug1: /home/Tony/.ssh/config line 27: Applying options for remotehost
> debug2: ssh_connect: needpriv 0
> debug1: Connecting to localhost [::1] port 55554.
> debug1: Connection established.

This looks like you're sshing to localhost on port 55554, is that what
is supposed to happen when you ssh to "remotehost?" Did you point the
remotehost to localhost in /etc/hosts or something?

On 02/02/16 15:26, Tony Lewis wrote:
> On 2/02/2016 1:43 PM, Chris Smart wrote:
>> So ssh onto the box works perfectly in all cases, except when trying
>> to forward ports? -c
> Yes.

Also, in the more recent reply above you said that regular SSH worked
and that SSH *only* failed when you tried to forward ports (-L option),
but that command is failing on regular SSH. So I'm a bit confused.

Can you post the exact command you're using to ssh port-forward and just
swap out the remote IP for "remoteip" and swap out the ip address of the
machine you're forwarding ports to with "forwardip" or something?


 ^ ^

More information about the linux mailing list