Hello. I'm having a problem with Sshwifty. I can load it on my website, but it doesn't actually allow me to connect to anything. I get this message whenever I try to click on "SSH" or "Telnet".
"Unable to connect to the Sshwifty backend server: TypeError: window.crypto.subtle is undefined"
The error you're encountering—TypeError: window.crypto.subtle is undefined—indicates that the Web Cryptography API required by Sshwifty is not available in your environment. This API is critical for secure operations like SSH key handling.
Suggested investigations:
The Web Cryptography API (including window.crypto.subtle) is only available in secure contexts, meaning it requires:
HTTPS for remote sites.
localhost is treated as a secure context, which is why it works locally.
Hosting Issue:
If your website is served over plain HTTP instead of HTTPS, the window.crypto.subtle API will not be available.
You should always state critical facts—like that you’re working in a Docker container—when posting questions. Omitting such basic details demonstrates a lack of understanding of the environment you’re working in and makes it harder for others to help you effectively.
I simply cannot understand what your are doing, the architecture you are working in, the software stack, the application, the docker configuration, etc.
So, I hope someone else can understand and help you better!
Happy New Year 2025 and Best of Luck and Prosperity to You!