huashengdun / webssh

:seedling: Web based ssh client
https://webssh.huashengdun.org/
MIT License
4.57k stars 1.3k forks source link

Private key issue in upload #353

Open afzalvii opened 1 year ago

afzalvii commented 1 year ago

I tried to change the index.html to not upload .pem file but just dropdown, i put the pem file together with main.py handler.py in webssh folder, but when i select the pem file it will say invalid key. I guest my question is what should be the value or the file path in this value="webssh/key.pem">key<

huashengdun commented 1 year ago

It is a multipart form.
The value of Private Key actually is the content of this file. If you want to use a private key on your webssh server instead of your local computer, then you will have to change the code in files , including index.html, main.js and handler.py, I guess.

afzalvii commented 1 year ago

i tried but when i add it and then call the pem file it will have an error bad authentication. i guess have to change code in handler