CyberPanel Community

Changing ssh port breaks web terminal

ik
ikk157 #1

I recently changed the ssh port, but as soon as I did so, that broke the web terminal. It shows error connecting to backend.

Any clue on how i can updates the new port on the web terminal?

19 replies
ve
veriloji #2

Hello,

Change file; /usr/local/CyberCP/WebTerminal/CPWebSocket.py

self.sshclient.connect(‘127.0.0.1’, 22, username=‘root’, pkey=k)

replace port 22 here

then restart the ssh server and kill CPWeb process

ps aux | grep CPWeb

kill -9 pid number

ik
ikk157 #3

@veriloji said:
Hello,

Change file; /usr/local/CyberCP/WebTerminal/CPWebSocket.py

self.sshclient.connect(‘127.0.0.1’, 22, username=‘root’, pkey=k)

replace port 22 here

then restart the ssh server and kill CPWeb process

ps aux | grep CPWeb

kill -9 pid number

Did that to no avail. The issue persists.

ik
ikk157 #4

I forgot to mention that i also disabled the root user. Could that also contribute to the issue?

ve
veriloji #5

Yes,

I haven’t tried, but change root in this file.

self.sshclient.connect ( ‘127.0.0.1’, 22, username = ‘root’, pkey = k)

ik
ikk157 #6

@veriloji said:
Yes,

I haven’t tried, but change root in this file.

self.sshclient.connect ( ‘127.0.0.1’, 22, username = ‘root’, pkey = k)

I’ve already tried that too, along with the new port. Same issue.

ve
veriloji #7

I don’t know root account, i haven’t tried

But my server is work to different port.

ik
ikk157 #8

Weird

Cy
CyberPanel #9

I will detect SSH port from ssh configuration file, will produce a fix soon.

ik
ikk157 #12

@CyberPanel said:
I fixed the issue when port other then 22 is used → Bug fix: detect non-default SSH port for WebTerminal · usmannasir/cyberpanel@54f83c3 · GitHub

You can get the fix using new upgrade guide → 02 - Upgrading CyberPanel - 01 - Install/Upgrade - CyberPanel Community

You will also have to restart SSH web server.

I updated, but it still doesn’t work. However, when i re-enabled the root user from cyberpanel itself, the web terminal started working. However, as soon as I disable the root user (again, from cyberpanel itself), the web terminal stops working again.

Can you look into this too please?

ik
ikk157 #13

Anyone?

ik
ikk157 #14

Not sure why my issue keep going unnoticed. Am I doing something wrong?

Wr
Wraith #15

Hi, got still same problem after upgrade, please help!

Cy
CyberPanel #17

Are you using hostname SSL? Terminal won’t work without valid hostname SSL.

na
naszprezes #19

Oh, i think it should be noticed somewhere on screen, should not be? Thanks!

de
deep123 #20

can not connect using ssh…

Sign in to reply