Post by Colin WatsonPost by ÐнÑон ÐаÑÑкHi! I have a problem using kubuntu 15.04: When I do "ssh -l user -p 44
-L 8090:localhost:8090 -L 1234:localhost:5900 -R 5700:localhost:5900
my.hostname.org -N" - it opens connection, but when I try to use 5700
at remote computer, it says in local console "WARNING: Server requests
forwarding for unknown listen_port 5700". I'll appreciate any help.
You say that you're trying to use port 5700 on the remote system, but
you haven't said which host name you were trying to use. If you aren't
sure, adding the -v option to ssh should cause it to emit a debug
debug1: client_request_forwarded_tcpip: listen localhost port 5700,
originator 127.0.0.1 port 49286
... when you try to connect. I would expect to see your symptoms if
you're trying to connect to something other than localhost. If you
actually need to connect to something other than localhost at the remote
end, you'll need to enable GatewayPorts on the server and specify a
bind_address to ssh -R; see the ssh(1) and sshd_config(5) manual pages
for details.
I think this is very likely to be a configuration mistake rather than a
bug; the forwarding facility itself works fine.
Colin, thanks for a tip, I now have a workaround :)
Sorry to be absent for a long time, was busy time working.
Here is some logs, I just changed "localhost" to "127.0.0.1" and now it
works (the "other side" is a Win7 with WinSSHD):
$ ssh -v -l user -p 44 -L 8090:localhost:8090 -L 1234:localhost:5900 -R
localhost:5700:localhost:5900 -R localhost:2222:localhost:22 my.hostname.org
-N
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Ubuntu-5ubuntu1
debug1: Remote protocol version 2.0, remote software version 5.32 FlowSsh:
Bitvise SSH Server (WinSSHD) 6.24: free only for personal non-commercial use
debug1: no match: 5.32 FlowSsh: Bitvise SSH Server (WinSSHD) 6.24: free
only for personal non-commercial use
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha2-256 zlib
debug1: kex: client->server aes128-ctr hmac-sha2-256 zlib
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: DSA -=-changed here-=-
debug1: Host '[my.hostname.org]:44' is known and matches the DSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:1
debug1: Enabling compression at level 6.
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/user/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to my.hostname.org (via proxy).
debug1: Local connections to LOCALHOST:8090 forwarded to remote address
localhost:8090
debug1: Local forwarding listening on ::1 port 8090.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 8090.
debug1: channel 1: new [port listener]
debug1: Local connections to LOCALHOST:1234 forwarded to remote address
localhost:5900
debug1: Local forwarding listening on ::1 port 1234.
debug1: channel 2: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 1234.
debug1: channel 3: new [port listener]
debug1: Remote connections from LOCALHOST:5700 forwarded to local address
localhost:5900
debug1: Remote connections from LOCALHOST:2222 forwarded to local address
localhost:22
debug1: Entering interactive session.
debug1: remote forward success for: listen 5700, connect localhost:5900
debug1: remote forward success for: listen 2222, connect localhost:22
debug1: All remote forwarding requests processed
debug1: Connection to port 1234 forwarding to localhost port 5900 requested.
debug1: channel 4: new [direct-tcpip]
debug1: client_input_channel_open: ctype forwarded-tcpip rchan 1 win 262144
max 65536
debug1: client_request_forwarded_tcpip: listen 127.0.0.1 port 2222,
originator 127.0.0.1 port 61360
WARNING: Server requests forwarding for unknown listen_port 2222
debug1: failure forwarded-tcpip
debug1: client_input_channel_open: ctype forwarded-tcpip rchan 2 win 262144
max 65536
debug1: client_request_forwarded_tcpip: listen 127.0.0.1 port 5700,
originator 127.0.0.1 port 61423
WARNING: Server requests forwarding for unknown listen_port 5700
debug1: failure forwarded-tcpip
debug1: channel 4: free: direct-tcpip: listening port 1234 for localhost
port 5900, connect from 127.0.0.1 port 50061 to 127.0.0.1 port 1234,
nchannels 5
-=- now I am doing "127.0.0.1" instead of "localhost" and forwarding works
well -=-
$ ssh -v -l user -p 44 -L 8090:localhost:8090 -L 1234:localhost:5900 -R
127.0.0.1:5700:127.0.0.1:5900 -R 127.0.0.1:2222:127.0.0.1:22 my.hostname.org
-N
debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Ubuntu-5ubuntu1
debug1: Remote protocol version 2.0, remote software version 5.32 FlowSsh:
Bitvise SSH Server (WinSSHD) 6.24: free only for personal non-commercial use
debug1: no match: 5.32 FlowSsh: Bitvise SSH Server (WinSSHD) 6.24: free
only for personal non-commercial use
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha2-256 zlib
debug1: kex: client->server aes128-ctr hmac-sha2-256 zlib
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: DSA -=-changed here-=-
debug1: Host '[my.hostname.org]:44' is known and matches the DSA host key.
debug1: Found key in /home/user/.ssh/known_hosts:1
debug1: Enabling compression at level 6.
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/user/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to my.hostname.org (via proxy).
debug1: Local connections to LOCALHOST:8090 forwarded to remote address
localhost:8090
debug1: Local forwarding listening on ::1 port 8090.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 8090.
debug1: channel 1: new [port listener]
debug1: Local connections to LOCALHOST:1234 forwarded to remote address
localhost:5900
debug1: Local forwarding listening on ::1 port 1234.
debug1: channel 2: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 1234.
debug1: channel 3: new [port listener]
debug1: Remote connections from 127.0.0.1:5700 forwarded to local address
127.0.0.1:5900
debug1: Remote connections from 127.0.0.1:2222 forwarded to local address
127.0.0.1:22
debug1: Entering interactive session.
debug1: remote forward success for: listen 127.0.0.1:5700, connect
127.0.0.1:5900
debug1: remote forward success for: listen 127.0.0.1:2222, connect
127.0.0.1:22
debug1: All remote forwarding requests processed
debug1: Connection to port 1234 forwarding to localhost port 5900 requested.
debug1: channel 4: new [direct-tcpip]
debug1: client_input_channel_open: ctype forwarded-tcpip rchan 1 win 262144
max 65536
debug1: client_request_forwarded_tcpip: listen 127.0.0.1 port 5700,
originator 127.0.0.1 port 64668
debug1: connect_next: host 127.0.0.1 ([127.0.0.1]:5900) in progress, fd=10
debug1: channel 5: new [127.0.0.1]
debug1: confirm forwarded-tcpip
debug1: channel 5: connection failed: Connection refused
connect_to 127.0.0.1 port 5900: failed.
debug1: channel 5: free: 127.0.0.1, nchannels 6
debug1: client_input_channel_open: ctype forwarded-tcpip rchan 2 win 262144
max 65536
debug1: client_request_forwarded_tcpip: listen 127.0.0.1 port 2222,
originator 127.0.0.1 port 64868
debug1: connect_next: host 127.0.0.1 ([127.0.0.1]:22) in progress, fd=10
debug1: channel 5: new [127.0.0.1]
debug1: confirm forwarded-tcpip
debug1: channel 5: connected to 127.0.0.1 port 22
debug1: channel 5: free: 127.0.0.1, nchannels 6
debug1: client_input_channel_open: ctype forwarded-tcpip rchan 3 win 262144
max 65536
debug1: client_request_forwarded_tcpip: listen 127.0.0.1 port 5700,
originator 127.0.0.1 port 65225
debug1: connect_next: host 127.0.0.1 ([127.0.0.1]:5900) in progress, fd=10
debug1: channel 5: new [127.0.0.1]
debug1: confirm forwarded-tcpip
debug1: channel 5: connection failed: Connection refused
connect_to 127.0.0.1 port 5900: failed.
debug1: channel 5: free: 127.0.0.1, nchannels 6
debug1: client_input_channel_open: ctype forwarded-tcpip rchan 4 win 262144
max 65536
debug1: client_request_forwarded_tcpip: listen 127.0.0.1 port 5700,
originator 127.0.0.1 port 49238
debug1: connect_next: host 127.0.0.1 ([127.0.0.1]:5900) in progress, fd=10
debug1: channel 5: new [127.0.0.1]
debug1: confirm forwarded-tcpip
debug1: channel 5: connected to 127.0.0.1 port 5900
debug1: channel 5: free: 127.0.0.1, nchannels 6