Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to the Sshwifty backend server: TypeError: Cannot read properties of undefined (reading 'importKey') #161

Closed
Its-SheldonDev opened this issue Jan 21, 2024 · 6 comments

Comments

@Its-SheldonDev
Copy link

Hi, I installed Sshwifty with docker using the template on the git, when I go to the Sshwifty page and do + & ssh I get this message: Unable to connect to the Sshwifty backend server: TypeError: Cannot read properties of undefined (reading 'importKey')

@nirui
Copy link
Owner

nirui commented Jan 22, 2024

Hi, please see: https://github.com/nirui/sshwifty#why-i-got-error-typeerror-cannot-read-property-importkey-of-undefined

@xtay573269555
Copy link

xtay573269555 commented Mar 6, 2024

Hi, What is "any compatible (standard) web browser" mean ? Firefox or Chrome browser ?

I am using Firefox 115.8.0esr now, and I got the similar error "Unable to connect to the Sshwifty backend server: TypeError: window.crypto.subtle is undefined" via http://ip:port .

Hi, please see: https://github.com/nirui/sshwifty#why-i-got-error-typeerror-cannot-read-property-importkey-of-undefined

@xtay573269555
Copy link

Is it support for http ? Or it is https only ?

@nirui
Copy link
Owner

nirui commented Mar 6, 2024

Hi @xtay573269555, if you can access Sshwifty via URL points to local resource such as http://localhost or http://127.0.0.1:xxx, then HTTPS is not required. Otherwise, you need HTTPS to access Sshwifty (you can enable it via a self-signed certificate).

Please also aware that this limitation is imposed by the web browser, not Sshwifty. As long as you can access Sshwifty via https://, the error should go away. Meaning you can setup Sshwifty behind a Nginx reverse proxy and let it handle HTTPS termination (instead of letting Sshwifty itself handle HTTPS).

@xtay573269555
Copy link

xtay573269555 commented Mar 6, 2024

Yes. It works using https now. Thanks for explain.

The SSHWIFTY_SERVERMESSAGE will add a link on the homepage and here is a example.
-e SSHWIFTY_SERVERMESSAGE="[sshwifty](https://github.com/nirui/sshwifty)"

@nirui
Copy link
Owner

nirui commented Mar 6, 2024

Glad it worked.

Also, remember to upgrade to version 0.3.7 which was released minutes ago and contains upstream security updates :)

@nirui nirui closed this as completed Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants