• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Opening SSH Terminal in Plesk fails

MiSuisse

Basic Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
Plesk Obsidian 18.0.69
Hi all,

I have access to the terminal with Putty or from the interface if I use the IP to access the UI, but if I go through the domain name the terminal is blank and a "broken connection" error pops up

Code:
plesk-ssh-terminal.service - Plesk SSH Terminal Backend Service
     Loaded: loaded (/lib/systemd/system/plesk-ssh-terminal.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/plesk-ssh-terminal.service.d
             └─options.conf
             /usr/lib/systemd/system/plesk-ssh-terminal.service.d
             └─respawn.conf
     Active: active (running) since Wed 2025-04-16 14:14:16 CEST; 1h 59min ago
   Main PID: 914 (plesk-ssh-termi)
      Tasks: 7 (limit: 19054)
     Memory: 7.1M
        CPU: 30ms
     CGroup: /system.slice/plesk-ssh-terminal.service
             └─914 /usr/local/psa/admin/plib/modules/ssh-terminal/libexec/plesk-ssh-terminal.x86-64 --listen /run/plesk-ssh-terminal/backend.sock --connect-to "*:22"

Apr 16 14:14:16 plesk-hosting.mydom.org systemd[1]: Started Plesk SSH Terminal Backend Service.
Apr 16 16:11:15 plesk-hosting.mydom.org plesk-ssh-terminal.x86-64[914]: 2025/04/16 16:11:15 checkSameOrigin error: Origin header 'plesk-hosting.mydom.org' does not match request Host '192.168.1.30'
Apr 16 16:11:15 plesk-hosting.mydom.org plesk-ssh-terminal.x86-64[914]: 2025/04/16 16:11:15 remote=10.5.1.14 user=root WebSocket error: websocket: request origin not allowed by Upgrader.CheckOrigin
Apr 16 16:11:57 plesk-hosting.mydom.org plesk-ssh-terminal.x86-64[914]: 2025/04/16 16:11:57 remote=10.5.1.14 Session error: session with token ce514455207b063d5b5df5f1999feaa686d274df035491e62a13b2d4ec8443ab was not found

Code:
$ grep PermitRootLogin /etc/ssh/sshd_config
PermitRootLogin yes

Code:
Firewall :
SSH (secure shell) server => Allow incoming from all



it has no effect
Code:
$ /usr/local/psa/admin/sbin/modules/ssh-terminal/installer --update-configuration
Configuring to connect to *:22

$ systemctl restart plesk-ssh-terminal.service


panel.ini configuration :
Code:
extensionCatalogUrl = "/opt/psa/admin/conf/panel.ini.d/packages.json"

[webserver]
nginxClientMaxBodySize = 512m

[security]
sameOriginOnly = false

[updates]
updateDays = saturday,sunday
timeFrameStart = 11
timeFrameEnd = 18

[ext-nodejs]
showApplicationLogs = true

[websocket]
allow_any_origin = true

[ext-ssh-terminal]
rootAccessAllowed = true
 
if i use https://192.168.1.30/modules/ssh-terminal/ it works
if i use https://plesk-hosting.mydom.org/modules/ssh-terminal/ it doesn't work

Don't have message, only a black page with the pop-up 'connection broken'

the best log I found is
Code:
checkSameOrigin error: Origin header 'plesk-hosting.mydom.org' does not match request Host '192.168.1.30'
remote=10.5.1.14 user=root WebSocket error: websocket: request origin not allowed by Upgrader.CheckOrigin
remote=10.5.1.14 Session error: session with token ce514455207b063d5b5df5f1999feaa686d274df035491e62a13b2d4ec8443ab was not found

thanks for the help
 
The port is not opened directly, there is a forward reverse proxy with these properties:

Code:
location / {
        proxy_set_header X-Forwarded-Host $host:$server_port;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass https://192.168.1.30:8443};
    }

I don't think that's the problem, because my other server with the same configuration doesn't have the problem.
 
Indeed, if I modify the internal record of the machine to bypass the reverse proxy, it works.
I don't understand the problem, because my other server has the same configuration and doesn't have the problem.

After investigation, I will get back to you in a few days, thank you.
 
Any difference if you use the hostname instead of the IP address on this line?
NGINX:
proxy_pass https://192.168.1.30:8443
I see it's private so you may need to add it to hosts, you can figure that out.
 
Back
Top