Insert Text by Typing mangles URLs taken from the system clipboard

I'm hoping to get time tomorrow to install and play with UTM. Until then...

Implying that you are working from a local password vault that you are syncing via iCloud rather than 1Pass's default cloud sync?

Just passwords could be even easier! ssh into VM and set $ENV_MYPSWD to the password then trigger a KM macro on the VM that sets a local variable to $ENV_MYPSWD, ready for an "Insert by typing" action. OK -- dumb idea. But I've hope for kmtrigger plus a parameter or some other transient method of password passing...

So, having had a quick play...

You could pass your variable via ssh. Easiest way is to set up "passwordless ssh" from the host to the VM, then you could use the following:

VM Clipboard Test SSH.kmmacros (2.5 KB)

Summary

Replace the first action with however you'd get your text in (eg some kind of call to 1Pass). I've then base64ed the string because, quite honestly, I'm not smart enough to get the right mix of single- and double-quotes to pass funky password characters as literals without them being interpreted by the shell (problem avoidance, FTW!).

Obviously you need to change the last action's username and IP to match your VM account/IP. You're then just echoing the string via base64 decoding onto the VM's clipboard, from where you could paste.

If you're going to put KM on the VM, here's another approach using KM's built-in web server. I wouldn't use this for passwords, but it was fun to do and might give you some ideas. You have to turn on the web server in KM's preferences and will need to edit the IP and target macro UUID in the "Open URL" action. Again, the passed value will be put onto the VM's clipboard. You could probably do it cleaner, I've used (and left open) the browser tab so you can see what's going on. I've used URL-encoding just to show a different approach, you could use base64 as above, and remember that different browsers (and server configs!) have different character limits when using the GET method:

This is the "sender" on your host Mac:
VM Clipboard Test URL Trigger.kmmacros (2.2 KB)

Summary

And this the "receiver" on your VM:
Remote Trigger Test.kmmacros (1.3 KB)

Summary

Remote Trigger Test

1 Like