<p dir="ltr">I solve this using passmenu, which I've configured to use the Xorg primary keyboard. This lets me (in Linux) paste into most programs using Shift-Insert. So I simply hit Super-P to bring up passmenu, type a few characters to find the password I need and hit enter, enter my key passphrase if it's not cached in the agent, and finally hit Shift-Insert to paste into the terminal with the remote session. I've also patched pass to allow passmenu to show a desktop notification after copying the password.</p>
<p dir="ltr">If you're not in X, I suppose you could work around it using something like the clipboard feature in tmux. Not particularly elegant, but at least it'll work.</p>
<p dir="ltr">Hope that helps!</p>
<p dir="ltr">/Emil</p>
<br><div class="gmail_quote"><div dir="ltr">On Wed, 6 Apr 2016, 09:46 Dominic Sonntag, <<a href="mailto:dominic.sonntag@unitedprint.com">dominic.sonntag@unitedprint.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
when administrating a remote server, I login via SSH with key<br>
authentication. Is there a good way to use my local password store<br>
there, e.g. for getting a database password?<br>
<br>
I could do (from my local machine):<br>
<br>
ssh remoteserver mysql -u root -P$(pass remoteserver/mysql/root | head -n 1)<br>
<br>
But is there a way to do something like this from the server's bash?<br>
e.g.:<br>
<br>
local$ ssh remoteserver<br>
remoteserver$ mysql -u root -P$(pass remoteserver/mysql/root | head -n 1)<br>
<br>
Maybe this could be done with something like SSH key forwarding? And<br>
probably the password-store needs to exist on the server, too.<br>
<br>
Kind regards<br>
Dominic<br>
_______________________________________________<br>
Password-Store mailing list<br>
<a href="mailto:Password-Store@lists.zx2c4.com" target="_blank">Password-Store@lists.zx2c4.com</a><br>
<a href="http://lists.zx2c4.com/mailman/listinfo/password-store" rel="noreferrer" target="_blank">http://lists.zx2c4.com/mailman/listinfo/password-store</a><br>
</blockquote></div>