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

Remember Private Key #3

Closed
zhdenny opened this issue Aug 28, 2019 · 5 comments
Closed

Remember Private Key #3

zhdenny opened this issue Aug 28, 2019 · 5 comments

Comments

@zhdenny
Copy link

zhdenny commented Aug 28, 2019

Is there a way to have sshwifty remember the private key for a SSH connection?

Currently, it appears I need to re-enter my Private RSA Key every single time I want to connect to a specific host. Kind of a pain.

Thanks.

@nirui
Copy link
Owner

nirui commented Aug 29, 2019

Sorry, currently there is no way for Sshwifty to remember private credentials.

The function was implemented, but eventually removed because I've failed to found a way to safely save private credentials inside web browser (localStorage).

How about this: I'll change the input box (which is a HTML textarea currently) to a File selector, so you can directly select the private key file instead of having to manually re-enter it. Though, you still have to decrypt the key file before hand, and then select the decrypted key every single time when you try to login.

What do you think?

@zhdenny
Copy link
Author

zhdenny commented Aug 29, 2019

Yes, please. That would make me much happier.

Thank you sir!

@zhdenny
Copy link
Author

zhdenny commented Aug 29, 2019

Random question...but does Guacamole save private credentials safely? If they do, wonder if you could adopt their approach.

@nirui
Copy link
Owner

nirui commented Aug 29, 2019

I have no information about Guacamole because I don't use the software :(. But I'll look into it, thanks for the pointer.

For now:

I've added the feature described above (Change textarea to <input type="file" /> ).

In addition to that, credentials will now be saved in memory (in a JavaScript variable that is), so you only need to re-enter them once every time the webpage is reloaded.

It only works if you connect by clicking items of the "Known remotes" list. Otherwise you still have to re-enter everything.

Also, a reminder: You need to clear the page cache (By clicking the Refresh button of your web browser) to use the new client application.

@nirui nirui closed this as completed Aug 29, 2019
@nirui
Copy link
Owner

nirui commented Aug 31, 2019

@zhdenny Hey, uh just letting you know, I've looked Guacamole. Seems to me that they are saving the credential into database in plain-text. At least when MySQL is used as storage backend.

mysql> use guacamole_db;
Database changed
mysql> SELECT * FROM guacamole_connection;
+---------------+-----------------+-----------+----------+------------+----------------+-------------------------+-----------------+--------------------------+-------------------+---------------+
| connection_id | connection_name | parent_id | protocol | proxy_port | proxy_hostname | proxy_encryption_method | max_connections | max_connections_per_user | connection_weight | failover_only |
+---------------+-----------------+-----------+----------+------------+----------------+-------------------------+-----------------+--------------------------+-------------------+---------------+
|             1 | router          |      NULL | ssh      |       NULL | NULL           | NULL                    |            NULL |                     NULL |              NULL |             0 |
+---------------+-----------------+-----------+----------+------------+----------------+-------------------------+-----------------+--------------------------+-------------------+---------------+
1 row in set (0.00 sec)

mysql> SELECT * FROM guacamole_connection_parameter;
+---------------+----------------+-----------------+
| connection_id | parameter_name | parameter_value |
+---------------+----------------+-----------------+
|             1 | enable-sftp    | true            |
|             1 | hostname       | <Masked>        |
|             1 | password       | router_password |
|             1 | port           | 22              |
|             1 | username       | root            |
+---------------+----------------+-----------------+
5 rows in set (0.01 sec)

mysql> 

It's not very ideal for us since Guacamole is been developed for a different purpose than Sshwifty. Also, we don't use storage backend (We're saving address book directly in the client web browser with window.localStorage).

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

2 participants