Article 57VS2 Problem with ssh local port forwarding timeout / transmission-daemon

Problem with ssh local port forwarding timeout / transmission-daemon

by
Nomen luni
from LinuxQuestions.org on (#57VS2)
Hi,

I'm running transmission-daemon on my Ubuntu server (Ubuntu 20.04.1) and am able to control it from my laptop (KDE Neon/Ubuntu 20.04 base) via the web interface at http://192.168.1.46:9091 (server IP, standard transmission-daemon port).

I want to access it through an SSH tunnel using local port forwarding - it's all on the local network at the moment but I want to do this as an exercise and allow me to maybe control it from other locations in future. I'm following this tutorial here

As I'm having trouble, I've disabled the firewalls on both the laptop and the server to rule that out as a problem. So here's what I'm doing,

On laptop:

lee@lee-laptop:~$ ssh vault -L 9092:127.0.0.1:9091 -v -v -v

OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f *31 Mar 2020
debug1: Reading configuration data /home/lee/.ssh/config
debug1: /home/lee/.ssh/config line 1: Applying options for vault
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.1.46 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.1.46 [192.168.1.46] port 22.
debug1: Connection established.
debug1: identity file /home/lee/.ssh/key_lee_rsa type 0
debug1: identity file /home/lee/.ssh/key_lee_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4ubuntu0.1
debug1: match: OpenSSH_8.2p1 Ubuntu-4ubuntu0.1 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.1.46:22 as 'lee'
debug3: hostkeys_foreach: reading file "/home/lee/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/lee/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from 192.168.1.46
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh...01@openssh.com,ecdsa-sha2-ni
stp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman
-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh...01@openssh.com,ecdsa-sha2-nistp521-cert-v01@op
enssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh
.com,sk-ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,sk-e
cdsa-sha2-nistp256@openssh.com,ssh-e...19@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128...cm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128...cm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm...tm@openssh.com,hmac-sha1-etm@
openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm...tm@openssh.com,hmac-sha1-etm@
openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos: *
debug2: languages stoc: *
debug2: first_kex_follows 0 *
debug2: reserved 0 *
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman
-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128...cm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128...cm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm...tm@openssh.com,hmac-sha1-etm@
openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm...tm@openssh.com,hmac-sha1-etm@
openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos: *
debug2: languages stoc: *
debug2: first_kex_follows 0 *
debug2: reserved 0 *
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:a+ludSEwanpKQg7MCUjAu/mwC0J7D0IMSPq2ITBXtKs
debug3: hostkeys_foreach: reading file "/home/lee/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/lee/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from 192.168.1.46
debug1: Host '192.168.1.46' is known and matches the ECDSA host key.
debug1: Found key in /home/lee/.ssh/known_hosts:1
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /home/lee/.ssh/key_lee_rsa RSA SHA256:bFgFnKREo1ue7fF6gYlN3qZ4VOQWqozXxBbm5Pxt8sg explicit
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp
256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/lee/.ssh/key_lee_rsa RSA SHA256:bFgFnKREo1ue7fF6gYlN3qZ4VOQWqozXxBbm5Pxt8sg explicit
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: /home/lee/.ssh/key_lee_rsa RSA SHA256:bFgFnKREo1ue7fF6gYlN3qZ4VOQWqozXxBbm5Pxt8sg explicit
debug3: sign_and_send_pubkey: RSA SHA256:bFgFnKREo1ue7fF6gYlN3qZ4VOQWqozXxBbm5Pxt8sg
debug3: sign_and_send_pubkey: signing using rsa-sha2-512 SHA256:bFgFnKREo1ue7fF6gYlN3qZ4VOQWqozXxBbm5Pxt8sg
debug3: send packet: type 50
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
Authenticated to 192.168.1.46 ([192.168.1.46]:22).
debug1: Local connections to LOCALHOST:9092 forwarded to remote address 127.0.0.1:9091
debug3: channel_setup_fwd_listener_tcpip: type 2 wildcard 0 addr NULL
debug3: sock_set_v6only: set socket 4 IPV6_V6ONLY
debug1: Local forwarding listening on ::1 port 9092.
debug2: fd 4 setting O_NONBLOCK
debug3: fd 4 is O_NONBLOCK
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 9092.
debug2: fd 5 setting O_NONBLOCK
debug3: fd 5 is O_NONBLOCK
debug1: channel 1: new [port listener]
debug1: channel 2: new [client-session]
debug3: ssh_session2_open: channel_new: 2
debug2: channel 2: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 80
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug3: receive packet: type 4
debug1: Remote: /home/lee/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 4
debug1: Remote: /home/lee/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 2: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x10
debug2: client_session2_setup: id 2
debug2: channel 2: request pty-req confirm 1
debug3: send packet: type 98
debug1: Sending environment.
debug3: Ignored env SHELL
debug3: Ignored env SESSION_MANAGER
debug3: Ignored env WINDOWID
debug3: Ignored env QT_ACCESSIBILITY
debug3: Ignored env COLORTERM
debug3: Ignored env XDG_CONFIG_DIRS
debug3: Ignored env XDG_SESSION_PATH
debug3: Ignored env LANGUAGE
debug1: Sending env LC_ADDRESS = en_GB.UTF-8
debug2: channel 2: request env confirm 0
debug3: send packet: type 98
debug1: Sending env LC_NAME = en_GB.UTF-8
debug2: channel 2: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env SSH_AUTH_SOCK
debug3: Ignored env SHELL_SESSION_ID
debug3: Ignored env DESKTOP_SESSION
debug1: Sending env LC_MONETARY = en_GB.UTF-8
debug2: channel 2: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env SSH_AGENT_PID
debug3: Ignored env GTK_RC_FILES
debug3: Ignored env XCURSOR_SIZE
debug3: Ignored env XDG_SEAT
debug3: Ignored env PWD
debug3: Ignored env XDG_SESSION_DESKTOP
debug3: Ignored env LOGNAME
debug3: Ignored env XDG_SESSION_TYPE
debug3: Ignored env GPG_AGENT_INFO
debug3: Ignored env XAUTHORITY
debug3: Ignored env GTK2_RC_FILES
debug3: Ignored env HOME
debug1: Sending env LC_PAPER = en_GB.UTF-8
debug2: channel 2: request env confirm 0
debug3: send packet: type 98
debug1: Sending env LANG = en_GB.UTF-8
debug2: channel 2: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env LS_COLORS
debug3: Ignored env XDG_CURRENT_DESKTOP
debug3: Ignored env KONSOLE_DBUS_SERVICE
debug3: Ignored env KONSOLE_DBUS_SESSION
debug3: Ignored env PROFILEHOME
debug3: Ignored env XDG_SEAT_PATH
debug3: Ignored env KONSOLE_VERSION
debug3: Ignored env KDE_SESSION_UID
debug3: Ignored env LESSCLOSE
debug3: Ignored env XDG_SESSION_CLASS
debug3: Ignored env TERM
debug1: Sending env LC_IDENTIFICATION = en_GB.UTF-8
debug2: channel 2: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env LESSOPEN
debug3: Ignored env USER
debug3: Ignored env COLORFGBG
debug3: Ignored env KDE_SESSION_VERSION
debug3: Ignored env PAM_KWALLET5_LOGIN
debug3: Ignored env DISPLAY
debug3: Ignored env SHLVL
debug1: Sending env LC_TELEPHONE = en_GB.UTF-8
debug2: channel 2: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env MOZ_USE_XINPUT2
debug1: Sending env LC_MEASUREMENT = en_GB.UTF-8
debug2: channel 2: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env XDG_VTNR
debug3: Ignored env XDG_SESSION_ID
debug3: Ignored env XDG_RUNTIME_DIR
debug1: Sending env LC_TIME = en_GB.UTF-8
debug2: channel 2: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env QT_AUTO_SCREEN_SCALE_FACTOR
debug3: Ignored env XCURSOR_THEME
debug3: Ignored env XDG_DATA_DIRS
debug3: Ignored env KDE_FULL_SESSION
debug3: Ignored env PATH
debug3: Ignored env DBUS_SESSION_BUS_ADDRESS
debug3: Ignored env KDE_APPLICATIONS_AS_SCOPE
debug1: Sending env LC_NUMERIC = en_GB.UTF-8
debug2: channel 2: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env KONSOLE_DBUS_WINDOW
debug3: Ignored env _
debug2: channel 2: request shell confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 2: callback done
debug2: channel 2: open confirm rwindow 0 rmax 32768
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 2
debug2: PTY allocation request accepted on channel 2
debug2: channel 2: rcvd adjust 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 2
debug2: shell request accepted on channel 2
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-45-generic x86_64)

* Documentation: *https://help.ubuntu.com
* Management: ****https://landscape.canonical.com
* Support: *******https://ubuntu.com/advantage

*System information as of Mon 07 Sep 2020 10:48:29 PM UTC

*System load: *0.08 **************Temperature: **********29.8 C
*Usage of /: **7.0% of 116.87GB **Processes: ************221
*Memory usage: 2% ****************Users logged in: ******0
*Swap usage: **0% ****************IPv4 address for eno1: 192.168.1.46

*=> There is 1 zombie process.

* Kubernetes 1.19 is out! Get it in one command with:

****sudo snap install microk8s --channel=1.19 --classic

**https://microk8s.io/ has docs and details.

1 update can be installed immediately.
0 of these updates are security updates.
To see these additional updates run: apt list --upgradable

Last login: Mon Sep *7 22:40:24 2020 from 192.168.1.45
lee@vault:~$

When I try to point my laptop's browser at the tunnel
(http://127.0.0.1:9092/transmission/web/) it receives nothing. At the server end, I'm seeing this:

lee@vault:~$ debug1: Connection to port 9092 forwarding to 127.0.0.1 port 9091 requested.
debug2: fd 9 setting TCP_NODELAY
debug2: fd 9 setting O_NONBLOCK
debug3: fd 9 is O_NONBLOCK
debug1: channel 3: new [direct-tcpip]
debug3: send packet: type 90

<<AND, after some time...>>

channel 3: open failed: connect failed: Connection timed out
debug2: channel 3: zombie
debug2: channel 3: garbage collecting
debug1: channel 3: free: direct-tcpip: listening port 9092 for 127.0.0.1 port 9091, connect from 127.0.0.1 port 53322 to 127.0.0.1 port 9092,
nchannels 4
debug3: channel 3: status: The following connections are open:
*#2 client-session (t4 r0 i0/0 o0/0 e[write]/0 fd 6/7/8 sock -1 cc -1)

Transmission-daemon settings on server (rpc whitelist disabled).

/etc/transmission-daemon/settings.json

{
***"alt-speed-down": 50,
***"alt-speed-enabled": false,
***"alt-speed-time-begin": 540,
***"alt-speed-time-day": 127,
***"alt-speed-time-enabled": false,
***"alt-speed-time-end": 1020,
***"alt-speed-up": 50,
***"bind-address-ipv4": "0.0.0.0",
***"bind-address-ipv6": "::",
***"blocklist-enabled": false,
***"blocklist-url": "http://www.example.com/blocklist",
***"cache-size-mb": 4,
***"dht-enabled": true,
***"download-dir": "/mnt/zstore/lee/Torrents",
***"download-limit": 100,
***"download-limit-enabled": 0,
***"download-queue-enabled": true,
***"download-queue-size": 5,
***"encryption": 1,
***"idle-seeding-limit": 30,
***"idle-seeding-limit-enabled": false,
***"incomplete-dir": "/mnt/zstore/lee/Torrents",
***"incomplete-dir-enabled": false,
***"lpd-enabled": false,
***"max-peers-global": 200,
***"message-level": 1,
***"peer-congestion-algorithm": "",
***"peer-id-ttl-hours": 6,
***"peer-limit-global": 200,
***"peer-limit-per-torrent": 50,
***"peer-port": 51413,
***"peer-port-random-high": 65535,
***"peer-port-random-low": 49152,
***"peer-port-random-on-start": false,
***"peer-socket-tos": "default",
***"pex-enabled": true,
***"port-forwarding-enabled": false,
***"preallocation": 1,
***"prefetch-enabled": true,
***"queue-stalled-enabled": true,
***"queue-stalled-minutes": 30,
***"ratio-limit": 2,
***"ratio-limit-enabled": false,
***"rename-partial-files": true,
***"rpc-authentication-required": true,
***"rpc-bind-address": "0.0.0.0",
***"rpc-enabled": true,
***"rpc-host-whitelist": "",
***"rpc-host-whitelist-enabled": true,
***"rpc-password": "{989de2eda824ba4aeb90e39563b849671e64d9f9QvN4Rjmm",
***"rpc-port": 9091,
***"rpc-url": "/transmission/",
***"rpc-username": "transmission",
***"rpc-whitelist": "127.0.0.1",
***"rpc-whitelist-enabled": false,
***"scrape-paused-torrents-enabled": true,
***"script-torrent-done-enabled": false,
***"script-torrent-done-filename": "",
***"seed-queue-enabled": false,
***"seed-queue-size": 10,
***"speed-limit-down": 100,
***"speed-limit-down-enabled": false,
***"speed-limit-up": 100,
***"speed-limit-up-enabled": false,
***"start-added-torrents": true,
***"trash-original-torrent-files": false,
***"umask": 18,
***"upload-limit": 100,
***"upload-limit-enabled": 0,
***"upload-slots-per-torrent": 14,
***"utp-enabled": true
}

My server's sshd config is set to Allowtcpforwarding yes.

Looks like the problem is with reading the final socket from the ssh server to the application. Any ideas?latest?d=yIl2AUoC8zA latest?i=22HpFCiQkzE:yoj28keejjQ:F7zBnMy latest?i=22HpFCiQkzE:yoj28keejjQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=22HpFCiQkzE:yoj28keejjQ:gIN9vFw22HpFCiQkzE
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments