lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.85k stars 292 forks source link

Using lastpass-cli without monitor (e.g. through ssh) #568

Open NikZak opened 3 years ago

NikZak commented 3 years ago

There is an issue with using lastpass-cli without monitor on linux.

Current behaviour: When I use lastpass-cli through ssh, lastpass asks to input password. If there is a session with a monitor connected on that computer then the password prompt appears on the monitor-session instead of the ssh session where I use lastpass-cli. This makes lastpass-cli unusable as I don't have access to monitor when using ssh. If there is no monitor then lastpass works well with ssh.

Expected behaviour: When I use lastpass-cli through ssh, lastpass should figure which session launched the cli and render the password prompt to that session.

NikZak commented 3 years ago

Ok, there is a workaround. Looks like setting environment variable LPASS_DISABLE_PINENTRY to 1

export LPASS_DISABLE_PINENTRY=1

solves the problem.