MisterTea / EternalTerminal

Re-Connectable secure remote shell
https://mistertea.github.io/EternalTerminal/
Apache License 2.0
3.02k stars 171 forks source link

[cannot connect] #157

Closed Overload119 closed 5 years ago

Overload119 commented 5 years ago

I have 2 servers, et is working correctly on one but not the other. I manually compiled on CentOS 7.

[deployer@sapco ~]$ systemctl status et
● et.service - Eternal Terminal
   Loaded: loaded (/usr/lib/systemd/system/et.service; enabled; vendor preset: disabled)
   Active: failed (Result: signal) since Sun 2018-11-11 17:23:03 PST; 3min 32s ago
  Process: 24211 ExecStart=/usr/local/bin/etserver --daemon --cfgfile=/etc/et.cfg (code=exited, status=0/SUCCESS)
 Main PID: 24212 (code=killed, signal=ABRT)

Nov 11 17:23:03 sapco systemd[1]: Starting Eternal Terminal...
Nov 11 17:23:03 sapco systemd[1]: Started Eternal Terminal.
Nov 11 17:23:03 sapco systemd[1]: et.service: main process exited, code=killed, status=6/ABRT
Nov 11 17:23:03 sapco systemd[1]: Unit et.service entered failed state.
Nov 11 17:23:03 sapco systemd[1]: et.service failed.

I see something similar to the above on both servers, yet on one of them I can still connect to etserver just fine.

[INFO 2018-11-11 17:29:11,561 client-main TerminalClient.cpp:280] Parsed ssh config file, connecting to 138.197.53.65
[INFO 2018-11-11 17:29:14,639 client-main SshSetupHandler.cpp:132] etserver started
[INFO 2018-11-11 17:29:14,639 client-main TerminalClient.cpp:70] ID PASSKEY: 2snb3u0MfIgmyVO9 536iVqulVSyt19pTlydnM2ggGSN61m9s
[V1 2018-11-11 17:29:14,639 client-main ClientConnection.cpp:21] Connecting
[V4 2018-11-11 17:29:14,650 client-main TcpSocketHandler.cpp:67] Set nonblocking
[V4 2018-11-11 17:29:14,650 client-main TcpSocketHandler.cpp:86] Before selecting sockFd
[INFO 2018-11-11 17:29:17,654 client-main TcpSocketHandler.cpp:130] Error connecting to 138.197.53.65:2022: 36 Operation now in progress
[ERROR 2018-11-11 17:29:17,655 client-main TcpSocketHandler.cpp:139] ERROR, no host found
[V1 2018-11-11 17:29:17,656 client-main ClientConnection.cpp:24] Could not connect to host
[ERROR 2018-11-11 17:29:17,656 client-main TerminalClient.cpp:94] Connecting to server failed: Connect timeout
[V1 2018-11-11 17:29:17,656 client-main TerminalClient.cpp:108] Client created with id: 2snb3u0MfIgmyVO9
[INFO 2018-11-11 17:29:17,668 client-main TerminalClient.cpp:122] Window size changed: 59 290 0 0

This is the error message I see when I use et -v 1 -logtostdout sapco

On the server however, I'm able to see some sessions that seem to work.

image

Can anyone shed some light on this?

MisterTea commented 5 years ago

It looks like you are doing the ssh handshake fine but the et connection can't be established. You should check if you can telnet to port 2022 on the server. Maybe the server has a firewall or there's a NAT blocking the connection?

Overload119 commented 5 years ago

You were right! Thanks so much.

For anyone else who has the same issue: on the client I used: nc <myip> 2022 This command never completed, whereas it did with another server I could access.

On the server:

sudo firewall-cmd --permanent --add-port=22/tcp
sudo firewall-cmd --reload