Need help with running et over a reverse tunnel
Apologies if this is a very naive request for help, but I've not been having any success getting EternalTerminal to work over a reverse tunnel, probably due to my limited experience with networking.
I have a local server behind a NAT, but I would like to ssh into this server publicly. I have access to a public remote server (a Google Cloud VM instance), so from my local server, I can set up remote port forwarding with
local-server:~$ ssh -R 2222:localhost:22 remote-server
which allows me to access the local server from the remote server via port 2222 without any problem:
remote-server:~$ ssh localhost -p 2222
I have also created an entry in the ssh config file on the remote server like so:
Host local-server
HostName localhost
Port 2222
and
remote-server:~$ ssh local-server
works fine.
However, if I try
remote-server:~$ et local-server
after successfully authenticating, I get
Error connecting to server: 3: Client is not registered
Rerunning with --verbose=9 and --logtostdout gives
Setting up and starting sentry
[INFO 2024-11-27 11:12:16,149 client-main ParseConfigFile.hpp:1186] /etc/ssh/ssh_config.d/*.confnot found
[INFO 2024-11-27 11:12:16,149 client-main ParseConfigFile.hpp:1405] unsupported config line: SendEnv LANG LC_*, ignored
[INFO 2024-11-27 11:12:16,149 client-main ParseConfigFile.hpp:1405] unsupported config line: HashKnownHosts yes, ignored
[INFO 2024-11-27 11:12:16,149 client-main ParseConfigFile.hpp:1405] unsupported config line: GSSAPIAuthentication yes, ignored
[INFO 2024-11-27 11:12:16,149 client-main TerminalClientMain.cpp:249] Parsed ssh config file, connecting to localhost
[V1 2024-11-27 11:12:16,149 client-main TerminalClientMain.cpp:16] Connecting
[V4 2024-11-27 11:12:16,150 client-main TcpSocketHandler.cpp:83] Before selecting sockFd
[V4 2024-11-27 11:12:16,151 client-main TcpSocketHandler.cpp:87] sockFd 8is selected8
[INFO 2024-11-27 11:12:16,151 client-main TcpSocketHandler.cpp:96] Connected to server: localhost using fd 8
[V1 2024-11-27 11:12:16,151 client-main UnixSocketHandler.cpp:166] Closing connection: 8
[V1 2024-11-27 11:12:16,152 client-main SshSetupHandler.cpp:78] Trying ssh with args: <username>@local-server echo 'XXX0vbaOBt3poR88/kjaIDqT8hau4tJGTxj242HhVrxxvAQkh_xterm-256color' | etterminal --verbose=9
[INFO 2024-11-27 11:12:31,131 client-main SshSetupHandler.cpp:104] etserver started
[V1 2024-11-27 11:12:31,131 client-main ClientConnection.cpp:21] Connecting
[V4 2024-11-27 11:12:31,131 client-main TcpSocketHandler.cpp:83] Before selecting sockFd
[V4 2024-11-27 11:12:31,131 client-main TcpSocketHandler.cpp:87] sockFd 9is selected9
[INFO 2024-11-27 11:12:31,131 client-main TcpSocketHandler.cpp:96] Connected to server: localhost using fd 9
[V1 2024-11-27 11:12:31,131 client-main ClientConnection.cpp:27] Sending id
[V4 2024-11-27 11:12:31,131 client-main UnixSocketHandler.cpp:61] Unixsocket handler write to fd: 9
[V4 2024-11-27 11:12:31,131 client-main UnixSocketHandler.cpp:61] Unixsocket handler write to fd: 9
[V1 2024-11-27 11:12:31,131 client-main ClientConnection.cpp:32] Receiving client id
[V4 2024-11-27 11:12:31,131 client-main Headers.hpp:350] Before selecting sockFd
[V4 2024-11-27 11:12:31,132 client-main UnixSocketHandler.cpp:23] socket 9 has data
[V4 2024-11-27 11:12:31,132 client-main UnixSocketHandler.cpp:45] Unixsocket handler read from fd: 9
[V4 2024-11-27 11:12:31,132 client-main Headers.hpp:350] Before selecting sockFd
[V4 2024-11-27 11:12:31,132 client-main UnixSocketHandler.cpp:23] socket 9 has data
[V4 2024-11-27 11:12:31,132 client-main UnixSocketHandler.cpp:45] Unixsocket handler read from fd: 9
[ERROR 2024-11-27 11:12:31,139 client-main ClientConnection.cpp:40] Stack Trace:
[0] 0xa63fa void google::protobuf::internal::arena_destruct_object<google::protobuf::internal::InternalMetadata::Container<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >(void*)
[1] 0x5f01a memfd_create
[2] 0x2fc53 memfd_create
[3] 0x7931a742a1ca __libc_init_first
[4] 0x7931a742a28b __libc_start_main
[5] 0x33b35 memfd_create
Error connecting to server: 3: Client is not registered
Error connecting to server: 3: Client is not registered
[INFO 2024-11-27 11:12:31,140 client-main ClientConnection.cpp:64] Got failure during connect
[V1 2024-11-27 11:12:31,140 client-main UnixSocketHandler.cpp:166] Closing connection: 9
[WARNING 2024-11-27 11:12:31,140 client-main TerminalClient.cpp:118] Connecting to server failed: Connect timeout
[V1 2024-11-27 11:12:31,140 client-main TerminalClient.cpp:135] Client created with id: F2FiijpjpeaU3Cel
[V4 2024-11-27 11:12:31,140 client-main TerminalClient.cpp:213] Got data from stdin
I have ensured that port 2022 is opened on the local server, and running et locally on the local server works fine. So I am not sure how to get EternalTerminal to work with the reverse tunnel. Perhaps something to do with me not forwarding the right ports? I'd appreciate any help. Many thanks!
What OS are you running on the server? That's a strange protobuf error
I am running Ubuntu 24.04.1 on the remote server and Arch on the local server. On the Ubuntu remote server, I have et/noble,now 6.2.9-noble1 amd64 and libprotobuf32t64/noble,now 3.21.12-8.2build1 amd64. On the Arch local server, I have eternalterminal 6.2.9-1 and protobuf 28.3-1.
I think we should start building static binaries. But for now, can you try building et from source and replacing the etserver and etterminal binaries in /usr/bin with the ones you built?
On Wed, Dec 11, 2024, 6:50 PM Bang C. Huynh @.***> wrote:
I am running Ubuntu 24.04.1 on the remote server and Arch on the local server. On the Ubuntu remote server, I have et/noble,now 6.2.9-noble1 amd64 and libprotobuf32t64/noble,now 3.21.12-8.2build1 amd64. On the Arch local server, I have eternalterminal 6.2.9-1 and protobuf 28.3-1.
— Reply to this email directly, view it on GitHub https://github.com/MisterTea/EternalTerminal/issues/678#issuecomment-2537505147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACK5PZIMQJ5KGFS2LGMUND2FDMUZAVCNFSM6AAAAABSSTFUFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZXGUYDKMJUG4 . You are receiving this because you commented.Message ID: @.***>
I have tried compiling et from source using these instructions (https://github.com/MisterTea/EternalTerminal#debianubuntu), but still run into more or less the same error:
[INFO 2024-12-17 22:36:24,177 client-main ParseConfigFile.hpp:1186] /etc/ssh/ssh_config.d/*.conf not found
[INFO 2024-12-17 22:36:24,177 client-main ParseConfigFile.hpp:1405] unsupported config line: SendEnv LANG LC_*, ignored
[INFO 2024-12-17 22:36:24,177 client-main ParseConfigFile.hpp:1405] unsupported config line: HashKnownHosts yes, ignored
[INFO 2024-12-17 22:36:24,177 client-main ParseConfigFile.hpp:1405] unsupported config line: GSSAPIAuthentication yes, ignored
[INFO 2024-12-17 22:36:24,177 client-main TerminalClientMain.cpp:249] Parsed ssh config file, connecting to localhost
[V1 2024-12-17 22:36:24,177 client-main TerminalClientMain.cpp:16] Connecting
[V4 2024-12-17 22:36:24,178 client-main TcpSocketHandler.cpp:83] Before selecting sockFd
[V4 2024-12-17 22:36:24,178 client-main TcpSocketHandler.cpp:87] sockFd 6 is selected
[INFO 2024-12-17 22:36:24,178 client-main TcpSocketHandler.cpp:96] Connected to server: localhost using fd 6
[V1 2024-12-17 22:36:24,178 client-main UnixSocketHandler.cpp:166] Closing connection: 6
[V1 2024-12-17 22:36:24,179 client-main SshSetupHandler.cpp:78] Trying ssh with args: <username>@local-server echo 'XXX9HSRjEnZnFSIb/feBVHiHYKLpXEiFD4dm8mmfNr2aKm4wx_xterm-256color' | etterminal --verbose=9
[INFO 2024-12-17 22:36:36,056 client-main SshSetupHandler.cpp:104] etserver started
[V1 2024-12-17 22:36:36,056 client-main ClientConnection.cpp:21] Connecting
[V4 2024-12-17 22:36:36,057 client-main TcpSocketHandler.cpp:83] Before selecting sockFd
[V4 2024-12-17 22:36:36,057 client-main TcpSocketHandler.cpp:87] sockFd 7 is selected
[INFO 2024-12-17 22:36:36,057 client-main TcpSocketHandler.cpp:96] Connected to server: localhost using fd 7
[V1 2024-12-17 22:36:36,057 client-main ClientConnection.cpp:27] Sending id
[V4 2024-12-17 22:36:36,057 client-main UnixSocketHandler.cpp:61] Unixsocket handler write to fd: 7
[V4 2024-12-17 22:36:36,057 client-main UnixSocketHandler.cpp:61] Unixsocket handler write to fd: 7
[V1 2024-12-17 22:36:36,057 client-main ClientConnection.cpp:32] Receiving client id
[V4 2024-12-17 22:36:36,057 client-main Headers.hpp:350] Before selecting sockFd
[V4 2024-12-17 22:36:36,057 client-main UnixSocketHandler.cpp:23] socket 7 has data
[V4 2024-12-17 22:36:36,058 client-main UnixSocketHandler.cpp:45] Unixsocket handler read from fd: 7
[V4 2024-12-17 22:36:36,058 client-main Headers.hpp:350] Before selecting sockFd
[V4 2024-12-17 22:36:36,058 client-main UnixSocketHandler.cpp:23] socket 7 has data
[V4 2024-12-17 22:36:36,058 client-main UnixSocketHandler.cpp:45] Unixsocket handler read from fd: 7
[ERROR 2024-12-17 22:36:36,067 client-main ClientConnection.cpp:40] Stack Trace:
[0] 0x59ac32514600
[1] 0x59ac3246cddf
[2] 0x59ac323cecdc
[3] 0x70c5acc2a1ca
[4] 0x70c5acc2a28b __libc_start_main
[5] 0x59ac323c2de5
Error connecting to server: 3: Client is not registered
[INFO 2024-12-17 22:36:36,068 client-main ClientConnection.cpp:64] Got failure during connect
[V1 2024-12-17 22:36:36,068 client-main UnixSocketHandler.cpp:166] Closing connection: 7
[WARNING 2024-12-17 22:36:36,068 client-main TerminalClient.cpp:118] Connecting to server failed: Connect timeout
[V1 2024-12-17 22:36:36,068 client-main TerminalClient.cpp:135] Client created with id: 0HMTLR7G4DSyxZV7
[V4 2024-12-17 22:36:36,068 client-main TerminalClient.cpp:213] Got data from stdin