omegion / ssh-manager

SSH Key Manager for 1Password, Bitwarden and AWS S3.
https://ssh-manager.omegion.dev
Apache License 2.0
256 stars 8 forks source link

add --provider bw reports success even without unlocked session #107

Open fionnb opened 2 years ago

fionnb commented 2 years ago

Describe the bug Adding a key via bw provider reports success, even though the key is not stored.

To Reproduce Steps to reproduce the behavior:

  1. make sure no open bw session is active: bw lock
  2. Run ssh-manager add --provider bw --name test123 --private-key bla --public-key bla.pub
  3. See message time="xx-yy-2022 22:22:22" level=info msg="Manager Keys saved for test123."
  4. find out no key has been actually stored in bw

Expected behavior An error message, stating that the key could not be added.

Environment:

omegion commented 2 years ago

@fionnb is it possible to run with --logLevel=debug, it might help to understand where it fails.

MylesBolton commented 8 months ago

im abit late but here is the debug output

image

running on Arch (EndeavorOS) edit: ssh-manager v1.8.6

MylesBolton commented 8 months ago

ok so anyone having problems you need to run bw unlock

just copy and run the export BW_SESSION="SuperSecretKey"

then you can use ssh-manager without any problems hopefully

MylesBolton commented 8 months ago

maybe could bee a good idea to check if the user has BW unlocked when running ssh-manager