bug-httptunnel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: htc -> hts


From: Jon McClelland
Subject: Fwd: htc -> hts
Date: Mon, 28 Jul 2014 02:56:38 +0100

Hi,

I can get sftp to work via htc->hts, but I can't get a shell to work. Debug below. Have I configured something wrong, or does this look like a bug? I'm using the latest download (3.0.5).

thanks,
Jon


Setup the Server side
# ./hts -F 192.168.1.4:22 2222
Jul 24 23:10:19 box1 hts[22997]: hts (httptunnel) 3.0.5 started with arguments:
Jul 24 23:10:19 box1 hts[22997]:   me = ./hts
Jul 24 23:10:19 box1 hts[22997]:   device = (null)
Jul 24 23:10:19 box1 hts[22997]:   port = 2222
Jul 24 23:10:19 box1 hts[22997]:   forward_port = 22
Jul 24 23:10:19 box1 hts[22997]:   forward_host = 192.168.1.4
Jul 24 23:10:19 box1 hts[22997]:   content_length = 102400
Jul 24 23:10:19 box1 hts[22997]:   debug_level = 0
Jul 24 23:10:19 box1 hts[22997]:   pid_filename = (null)

Setup the Client side
# ./htc -F 4444 192.168.1.4:2222

Jul 24 23:10:51 box1 htc[23003]: htc (httptunnel) 3.0.5 started with arguments:
Jul 24 23:10:51 box1 htc[23003]:   me = ./htc
Jul 24 23:10:51 box1 htc[23003]:   device = (null)
Jul 24 23:10:51 box1 htc[23003]:   host_name = 192.168.1.4
Jul 24 23:10:51 box1 htc[23003]:   host_port = 2222
Jul 24 23:10:51 box1 htc[23003]:   proxy_name = (null)
Jul 24 23:10:51 box1 htc[23003]:   proxy_port = 8080
Jul 24 23:10:51 box1 htc[23003]:   proxy_buffer_size = 0
Jul 24 23:10:51 box1 htc[23003]:   proxy_buffer_timeout = -1
Jul 24 23:10:51 box1 htc[23003]:   content_length = 102400
Jul 24 23:10:51 box1 htc[23003]:   forward_port = 4444
Jul 24 23:10:51 box1 htc[23003]:   max_connection_age = 300
Jul 24 23:10:51 box1 htc[23003]:   strict_content_length = 0
Jul 24 23:10:51 box1 htc[23003]:   keep_alive = 5
Jul 24 23:10:51 box1 htc[23003]:   proxy_authorization = (null)
Jul 24 23:10:51 box1 htc[23003]:   user_agent = (null)
Jul 24 23:10:51 box1 htc[23003]:   debug_level = 0


Try to sftp, and it just works...!
$ sftp -p4444 jon@192.168.1.4
Connected to 192.168.1.4.
sftp> pwd


Try to ssh via client port and it fails..
$ ssh -vvv -p4444 jon@192.168.1.4
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /home/jon/.ssh/config
debug1: /home/jon/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.4 [192.168.1.4] port 4444.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/jon/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/jon/.ssh/id_rsa type 1
debug1: identity file /home/jon/.ssh/id_rsa-cert type -1
debug1: identity file /home/jon/.ssh/id_dsa type -1
debug1: identity file /home/jon/.ssh/id_dsa-cert type -1
debug1: identity file /home/jon/.ssh/id_ecdsa type -1
debug1: identity file /home/jon/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/jon/.ssh/id_ed25519 type -1
debug1: identity file /home/jon/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
ssh_exchange_identification: Connection closed by remote host


..server side logs show...
Jul 24 23:11:50 box1 htc[23003]: http_write_request: write error: Invalid argument
Jul 24 23:11:50 box1 htc[23003]: couldn't open tunnel: Invalid argument
Jul 24 23:11:50 box1 htc[23003]: exit with status = 1



Run ssh server in debug during above. Nothing disabled, so it seems no traffic comes out of hts from htc. htc->hts handshake broken?..

# /usr/sbin/sshd -p22 -ddd
debug2: load_server_config: filename /etc/ssh/sshd_config
debug2: load_server_config: done config len = 768
debug2: parse_server_config: config /etc/ssh/sshd_config len 768
debug3: /etc/ssh/sshd_config:5 setting Port 22
debug3: /etc/ssh/sshd_config:12 setting ListenAddress 192.168.1.4
debug3: /etc/ssh/sshd_config:13 setting Protocol 2
debug3: /etc/ssh/sshd_config:15 setting HostKey /etc/ssh/ssh_host_rsa_key
debug3: /etc/ssh/sshd_config:16 setting HostKey /etc/ssh/ssh_host_dsa_key
debug3: /etc/ssh/sshd_config:17 setting HostKey /etc/ssh/ssh_host_ecdsa_key
debug3: /etc/ssh/sshd_config:18 setting HostKey /etc/ssh/ssh_host_ed25519_key
debug3: /etc/ssh/sshd_config:20 setting UsePrivilegeSeparation yes
debug3: /etc/ssh/sshd_config:23 setting KeyRegenerationInterval 3600
debug3: /etc/ssh/sshd_config:24 setting ServerKeyBits 1024
debug3: /etc/ssh/sshd_config:27 setting SyslogFacility AUTH
debug3: /etc/ssh/sshd_config:28 setting LogLevel INFO
debug3: /etc/ssh/sshd_config:31 setting LoginGraceTime 120
debug3: /etc/ssh/sshd_config:32 setting PermitRootLogin without-password
debug3: /etc/ssh/sshd_config:33 setting StrictModes yes
debug3: /etc/ssh/sshd_config:35 setting RSAAuthentication yes
debug3: /etc/ssh/sshd_config:40 setting IgnoreRhosts yes
debug3: /etc/ssh/sshd_config:42 setting RhostsRSAAuthentication no
debug3: /etc/ssh/sshd_config:44 setting HostbasedAuthentication no
debug3: /etc/ssh/sshd_config:49 setting PermitEmptyPasswords no
debug3: /etc/ssh/sshd_config:53 setting ChallengeResponseAuthentication no
debug3: /etc/ssh/sshd_config:56 setting PasswordAuthentication yes
debug3: /etc/ssh/sshd_config:69 setting X11Forwarding yes
debug3: /etc/ssh/sshd_config:70 setting X11DisplayOffset 10
debug3: /etc/ssh/sshd_config:71 setting PrintMotd no
debug3: /etc/ssh/sshd_config:72 setting PrintLastLog yes
debug3: /etc/ssh/sshd_config:73 setting TCPKeepAlive yes
debug3: /etc/ssh/sshd_config:80 setting AcceptEnv LANG LC_*
debug3: /etc/ssh/sshd_config:82 setting Subsystem sftp /usr/lib/openssh/sftp-server
debug3: /etc/ssh/sshd_config:93 setting UsePAM yes
debug1: sshd version OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug3: Incorrect RSA1 identifier
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug3: Incorrect RSA1 identifier
debug3: Could not load "/etc/ssh/ssh_host_rsa_key" as a RSA1 public key
debug1: private host key: #0 type 1 RSA
debug3: Incorrect RSA1 identifier
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type DSA
debug3: Incorrect RSA1 identifier
debug3: Could not load "/etc/ssh/ssh_host_dsa_key" as a RSA1 public key
debug1: private host key: #1 type 2 DSA
debug3: Incorrect RSA1 identifier
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type ECDSA
debug3: Incorrect RSA1 identifier
debug3: Could not load "/etc/ssh/ssh_host_ecdsa_key" as a RSA1 public key
debug1: private host key: #2 type 3 ECDSA
debug3: Incorrect RSA1 identifier
debug3: Incorrect RSA1 identifier
debug3: Could not load "/etc/ssh/ssh_host_ed25519_key" as a RSA1 public key
debug1: private host key: #3 type 4 ED25519
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-p22'
debug1: rexec_argv[2]='-ddd'
debug3: oom_adjust_setup
Set /proc/self/oom_score_adj from 0 to -1000
debug2: fd 3 setting O_NONBLOCK
debug1: Bind to port 22 on 192.168.1.4.
Server listening on 192.168.1.4 port 22.
<don't see any activity during ssh attempt. Traffic not getting out of hts tunnel?>


...but if I use sftp, the handshake works fine...


debug3: fd 4 is not O_NONBLOCK
debug1: Server will not fork when running in debugging mode.
debug3: send_rexec_state: entering fd = 7 config len 768
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug1: rexec start in 4 out 4 newsock 4 pipe -1 sock 7
debug1: inetd sockets after dupping: 3, 3
Connection from 192.168.1.4 port 50365 on 192.168.1.4 port 22
debug1: Client protocol version 2.0; client software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug2: fd 3 setting O_NONBLOCK
debug2: Network child is on pid 24936
debug3: preauth child monitor started
debug3: privsep user:group 119:65534 [preauth]
debug1: permanently_set_uid: 119/65534 [preauth]
debug1: list_hostkey_types: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
debug1: SSH2_MSG_KEXINIT sent [preauth]
debug1: SSH2_MSG_KEXINIT received [preauth]
debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 [preauth]
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ssh-ed25519 [preauth]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [preauth]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [preauth]
debug2: kex_parse_kexinit: none,zlib@openssh.com [preauth]
debug2: kex_parse_kexinit: none,zlib@openssh.com [preauth]
debug2: kex_parse_kexinit:  [preauth]
debug2: kex_parse_kexinit:  [preauth]
debug2: kex_parse_kexinit: first_kex_follows 0  [preauth]
debug2: kex_parse_kexinit: reserved 0  [preauth]
debug2: kex_parse_kexinit: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 [preauth]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [preauth]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se [preauth]
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib [preauth]
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib [preauth]
debug2: kex_parse_kexinit:  [preauth]
debug2: kex_parse_kexinit:  [preauth]
debug2: kex_parse_kexinit: first_kex_follows 0  [preauth]
debug2: kex_parse_kexinit: reserved 0  [preauth]
debug2: mac_setup: setup hmac-md5-etm@openssh.com [preauth]
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none [preauth]
debug2: mac_setup: setup hmac-md5-etm@openssh.com [preauth]
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none [preauth]
debug1: expecting SSH2_MSG_KEX_ECDH_INIT [preauth]
debug3: mm_key_sign entering [preauth]
debug3: mm_request_send entering: type 6 [preauth]
debug3: mm_key_sign: waiting for MONITOR_ANS_SIGN [preauth]
debug3: mm_request_receive_expect entering: type 7 [preauth]
debug3: mm_request_receive entering [preauth]
debug3: mm_request_receive entering
debug3: monitor_read: checking request 6
debug3: mm_answer_sign
debug3: mm_answer_sign: signature 0x7f15480e24c0(101)
debug3: mm_request_send entering: type 7
debug2: monitor_read: 6 used once, disabling now
debug2: kex_derive_keys [preauth]
debug2: set_newkeys: mode 1 [preauth]
debug1: SSH2_MSG_NEWKEYS sent [preauth]
debug1: expecting SSH2_MSG_NEWKEYS [preauth]
debug2: set_newkeys: mode 0 [preauth]
debug1: SSH2_MSG_NEWKEYS received [preauth]
debug1: KEX done [preauth]
debug1: userauth-request for user jon service ssh-connection method none [preauth]
debug1: attempt 0 failures 0 [preauth]
debug3: mm_getpwnamallow entering [preauth]
debug3: mm_request_send entering: type 8 [preauth]
debug3: mm_getpwnamallow: waiting for MONITOR_ANS_PWNAM [preauth]
debug3: mm_request_receive_expect entering: type 9 [preauth]
debug3: mm_request_receive entering [preauth]
debug3: mm_request_receive entering
debug3: monitor_read: checking request 8
debug3: mm_answer_pwnamallow
debug3: Trying to reverse map address 192.168.1.4.
debug2: parse_server_config: config reprocess config len 768
debug3: mm_answer_pwnamallow: sending MONITOR_ANS_PWNAM: 1
debug3: mm_request_send entering: type 9
debug2: monitor_read: 8 used once, disabling now
debug2: input_userauth_request: setting up authctxt for jon [preauth]
debug3: mm_start_pam entering [preauth]
debug3: mm_request_send entering: type 100 [preauth]
debug3: mm_inform_authserv entering [preauth]
debug3: mm_request_send entering: type 4 [preauth]
debug2: input_userauth_request: try method none [preauth]
debug3: userauth_finish: failure partial=0 next methods="publickey,password" [preauth]
debug3: mm_request_receive entering
debug3: monitor_read: checking request 100
debug1: PAM: initializing for "jon"
debug1: PAM: setting PAM_RHOST to "192.168.1.4"
debug1: PAM: setting PAM_TTY to "ssh"
debug2: monitor_read: 100 used once, disabling now
debug3: mm_request_receive entering
debug3: monitor_read: checking request 4
debug3: mm_answer_authserv: service=ssh-connection, style=, role=
debug2: monitor_read: 4 used once, disabling now


...enter password on client...


debug1: userauth-request for user jon service ssh-connection method password [preauth]
debug1: attempt 1 failures 0 [preauth]
debug2: input_userauth_request: try method password [preauth]
debug3: mm_auth_password entering [preauth]
debug3: mm_request_send entering: type 12 [preauth]
debug3: mm_auth_password: waiting for MONITOR_ANS_AUTHPASSWORD [preauth]
debug3: mm_request_receive_expect entering: type 13 [preauth]
debug3: mm_request_receive entering [preauth]
debug3: mm_request_receive entering
debug3: monitor_read: checking request 12
debug3: PAM: sshpam_passwd_conv called with 1 messages
debug1: PAM: password authentication accepted for jon
debug3: mm_answer_authpassword: sending result 1
debug3: mm_request_send entering: type 13
debug3: mm_request_receive_expect entering: type 102
debug3: mm_request_receive entering
debug1: do_pam_account: called
debug3: PAM: do_pam_account pam_acct_mgmt = 0 (Success)
debug3: mm_request_send entering: type 103
Accepted password for jon from 192.168.1.4 port 50365 ssh2
debug1: monitor_child_preauth: jon has been authenticated by privileged process
debug3: mm_get_keystate: Waiting for new keys
debug3: mm_request_receive_expect entering: type 26
debug3: mm_request_receive entering
debug3: mm_newkeys_from_blob: 0x7f15480fb9f0(138)
debug2: mac_setup: setup hmac-md5-etm@openssh.com
debug3: mm_get_keystate: Waiting for second key
debug3: mm_newkeys_from_blob: 0x7f15480fb9f0(138)
debug2: mac_setup: setup hmac-md5-etm@openssh.com
debug3: mm_get_keystate: Getting compression state
debug3: mm_get_keystate: Getting Network I/O buffers
debug3: mm_auth_password: user authenticated [preauth]
debug3: mm_do_pam_account entering [preauth]
debug3: mm_request_send entering: type 102 [preauth]
debug3: mm_request_receive_expect entering: type 103 [preauth]
debug3: mm_request_receive entering [preauth]
debug3: mm_do_pam_account returning 1 [preauth]
debug3: mm_send_keystate: Sending new keys: 0x7f15480e3b30 0x7f15480e48f0 [preauth]
debug3: mm_newkeys_to_blob: converting 0x7f15480e3b30 [preauth]
debug3: mm_newkeys_to_blob: converting 0x7f15480e48f0 [preauth]
debug3: mm_send_keystate: New keys have been sent [preauth]
debug3: mm_send_keystate: Sending compression state [preauth]
debug3: mm_request_send entering: type 26 [preauth]
debug3: mm_send_keystate: Finished sending state [preauth]
debug1: monitor_read_log: child log fd closed
debug3: mm_share_sync: Share sync
debug3: mm_share_sync: Share sync end
debug1: PAM: establishing credentials
debug3: PAM: opening session
debug3: PAM: sshpam_store_conv called with 1 messages
User child is on pid 24974
debug1: SELinux support disabled
debug1: PAM: establishing credentials
debug1: permanently_set_uid: 1000/1000
debug2: set_newkeys: mode 0
debug2: set_newkeys: mode 1
debug1: Entering interactive session for SSH2.
debug2: fd 6 setting O_NONBLOCK
debug2: fd 8 setting O_NONBLOCK
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 0 win 2097152 max 32768
debug1: input_session_request
debug1: channel 0: new [server-session]
debug2: session_new: allocate (allocated 0 max 10)
debug3: session_unused: session id 0 unused
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_global_request: rtype no-more-sessions@openssh.com want_reply 0
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug2: Setting env 0: LC_PAPER=en_GB.UTF-8
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug2: Setting env 1: LC_ADDRESS=en_GB.UTF-8
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug2: Setting env 2: LC_MONETARY=en_GB.UTF-8
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug2: Setting env 3: LC_NUMERIC=en_GB.UTF-8
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug2: Setting env 4: LC_TELEPHONE=en_GB.UTF-8
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug2: Setting env 5: LC_IDENTIFICATION=en_GB.UTF-8
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug2: Setting env 6: LANG="en_GB.UTF-8"
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug2: Setting env 7: LC_MEASUREMENT=en_GB.UTF-8
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug2: Setting env 8: LC_TIME=en_GB.UTF-8
debug1: server_input_channel_req: channel 0 request env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug2: Setting env 9: LC_NAME=en_GB.UTF-8
debug1: server_input_channel_req: channel 0 request subsystem reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req subsystem
debug2: subsystem request for sftp by user jon
debug1: subsystem: exec() /usr/lib/openssh/sftp-server
Starting session: subsystem 'sftp' for jon from 192.168.1.4 port 50365
debug2: fd 3 setting TCP_NODELAY
debug3: packet_set_tos: set IP_TOS 0x08
debug2: fd 11 setting O_NONBLOCK
debug2: fd 10 setting O_NONBLOCK
debug2: fd 13 setting O_NONBLOCK
debug2: channel 0: read 86 from efd 13
debug3: channel 0: discard efd
debug2: channel 0: read 645 from efd 13
debug3: channel 0: discard efd
debug2: channel 0: read 163 from efd 13
debug3: channel 0: discard efd
debug2: channel 0: read 87 from efd 13
debug3: channel 0: discard efd
debug2: channel 0: read 203 from efd 13
debug3: channel 0: discard efd
debug2: channel 0: read 306 from efd 13
debug3: channel 0: discard efd
debug2: channel 0: read 35 from efd 13
debug3: channel 0: discard efd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]