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 Key #131

Closed
CurtisFeatures opened this issue Nov 18, 2019 · 23 comments
Closed

Remember Key #131

CurtisFeatures opened this issue Nov 18, 2019 · 23 comments

Comments

@CurtisFeatures
Copy link

Hi,

Is there a way to remember the Key so I can have the drive automatically mapped with no user input? If I need to use a key file to do this then thats fine and I will have to try and figure out how to set this up.

Thanks
Jamie

@mhogomchungu
Copy link
Owner

Steps to take to configure SiriKali to connect to ssh server using sshfs are documented here[1].

What you want is possible using public key authentication with a private key not password protected(Option 3).

[1] https://github.com/mhogomchungu/sirikali/wiki/Frequently-Asked-Questions#90-how-do-i-add-options-to-connect-to-an-ssh-server

@fabeit
Copy link

fabeit commented May 14, 2020

I am sorry but I am getting lost with trying to store a password to connect mount an sftp drive through ssh. I would like for SiriKali to remember the Key so I don't have to type it, is creating a private key the only way to do it?

@mhogomchungu
Copy link
Owner

  1. What version of SiriKali are you using?
  2. You are using it on what OS?

@fabeit
Copy link

fabeit commented May 14, 2020

Sorry I should have specified. Version 1.4.3 and I am on Windows 10 64-bit

@mhogomchungu
Copy link
Owner

That ability will be in the next version[1] and i plan to release it on june first, 2020.

Will post a git based binary package within a few hours for you to use.

[1]

-- Add support for storing keys securely on Windows by using Window's Data Protection API.

@mhogomchungu
Copy link
Owner

mhogomchungu commented May 14, 2020

You can get a binary package with the functionality from here: https://github.com/mhogomchungu/sirikali/releases/download/1.4.3/SiriKali-1.4.3-next-2020-05-13.setup.exe

Once you have it installed, do the following:

  1. Click the favorites entry on the menu bar.
  2. Select "Manage Favorites" on the generated menu list.
  3. Click "Select Keys In Wallet" tab.
  4. Select "windows' DPAPI" entry on the default wallet list.
  5. A window will show up asking you to enter a password and enter the password you want to use to protect your login passwords you want SiriKali to manage for you. You will be asked for this password the firs time SiriKali wants to access stored passwords when it is started/restarted. You can use an empty password if you don't want to be bothered with the password prompt(Not recommended)..
  6. Enter Volume Path and Its Password in their respective places and then click "Add Volume To Selected Wallet".
  7. Close the window.

SiriKali will now automatically read the saved password and add it to the mount dialog window.

The tab to select storage backend and to enter credentials to be saved look like below:

Screenshot_20200514_141526

@fabeit
Copy link

fabeit commented May 15, 2020

Thank you! I will test this and get back to you

@fabeit
Copy link

fabeit commented May 17, 2020

So I have tried
image

but then when I select Mount all it prompts the key
image

@mhogomchungu
Copy link
Owner

The path you have hidden in your second screen shot is the path you are supposed to add to the windows password storage system.

When can Sirikali automatically take the volume key from the storage system, you can have SiriKali automatically mount the volume or show the mount window with the password already filled in. The option to choose between these two options is in the settings window.

@fabeit
Copy link

fabeit commented May 18, 2020

I am sorry but I can't get it to work. I have tried all combination possible in the volume path but I am still prompted a password. I have tried
"user@ssh.mysite.com:/"
"ssh.mysite.com:/"
"user@ssh.mysite.com:/myfolder/"
"D:/user@ssh.mysite.com:/"

@mhogomchungu
Copy link
Owner

mhogomchungu commented May 18, 2020

I just discovered a bug when retrieving passwords with sshfs backend and this explains why you couldnt get it to work. Will fix it first and then post steps on how to use it.

@fabeit
Copy link

fabeit commented May 18, 2020

Sounds good, I will wait for the fix then.

@mhogomchungu
Copy link
Owner

mhogomchungu commented May 19, 2020

Install version 1.4.4 and follow the following steps:

  1. Make sure the default wallet is set to "Windows DPAPI" and your above screenshot shows you know how to set it.
  2. Connect to the ssh server to have the volume show up on SiriKali main window.
  3. Right click on the volume entry on the main window and then click "Add To Favorites" as seen in image 1 below
  4. Above step will land you to a window as seen in image 2 below. Notice the volume path is already be set. Click the button pointed to by number "2".
  5. Above step will land you to a window as seen in image 3 below. Notice the volume path is already set. Enter the password in the text field pointed to number "4" and then press the button pointed to by number "5".
  6. Close the window.
  7. Unmount the volume on the main window and mount it again and report if SiriKali successfully picked up the key from window's DPAPI.

Image 1
1

Image 2
2

Image 3
3

@fabeit
Copy link

fabeit commented May 20, 2020

thank you my friend, it is finally working. I'm not sure why but the first time I have tried it was not working. I uninstalled and then reinstalled I left the Windows wallet password blank but still not working. Then I tried again but I set a password for the wallet, this time it was working! I then set again the wallet password to blank and it worked, the password shows up when the volume mount dialog appears. I had set the volume to auto mount but I still have to click on "OK", and I asking too much in the volume can be mounted automatically without any interaction? If when I start SiriKali I need to mount many volumes I would need to click through OK for each one of them, so the process is not completely automated. Thanks again for your assistance!

@mhogomchungu
Copy link
Owner

To set SiriKali to automatically get a volume key from a password store and automatically mount a volume, uncheck the option pointed to by number 1 in image 1 below.

To set SiriKali to automatically get volume keys from a password store and automatically mount all volumes that are set to automount when it is starting up, set the option pointed to by number 2 in image 1 and set the automount option to true for each volume you want to automount at start up. Image 2 shows step to to toggle on/off the automount option.

Image 1
1

Image 2
2

@fabeit
Copy link

fabeit commented May 22, 2020

thank you for your help things are getting better now and I'm able to get these mounted when Windows starts. There are still a few pickups, like the software needs to be completely closed and restarted, but I will able to report more specific bugs once I use it for a little longer. One problem might be with the auto-reconnect when the Internet connection goes down. thanks again

@mhogomchungu
Copy link
Owner

With the next version, clicking "mount all" will cause all volumes with the "auto mount" option set in their favorites entry and have passwords set in the default key store to auto mount.

@fabeit
Copy link

fabeit commented May 22, 2020

I see, is there anyway to have to volume re-connect after an internet disconnection or a wake from sleep?

@mhogomchungu
Copy link
Owner

sshfs seems to already be capable of doing what you want: https://serverfault.com/questions/6709/sshfs-mount-that-survives-disconnect/639735

@fabeit
Copy link

fabeit commented May 23, 2020

Good thinking, I did see that question before, so where do I add commands for sshf in Sirikali? -o reconnect and ServerAliveInterval=15. Can this go in the mount options?

@mhogomchungu
Copy link
Owner

Yes, the mount option field should already have two entries, add the ones you want and separate them with a comma character.

@mhogomchungu
Copy link
Owner

Version 1.4.4 is out and i recommend you switch to it

https://github.com/mhogomchungu/sirikali/releases/tag/1.4.4

@fabeit
Copy link

fabeit commented Jun 1, 2020

Nice thank you. For now it is working well with what we did before. I will give a test to this new build. I just noticed one minor thing in Windows, if you press Esc when you have a subwindow open it just disappears and you are force to quit the program.

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