Any way to quickly paste a user password into an ssh session?

I work with a lot of cloud servers. I ssh into them using authorized keys, so I don’t have to type a password. But then I often have to sudo commands, and that requires I type the current user’s password (that is, the password of the user on the remote machine).

The macOS terminal window title contains (among other things) <localuser> — ssh <remotehost> or <localuser> — ssh <remoteuser>@<remotehost> if a different user was used for the ssh session. 1Password should be able to extract that information to determine which user password to then paste into the terminal window when I sudo something.

That would be awesome.

Note: with appropriate xterm configuration on the remote side, this would even work if I'm sudoed to another user on the remote host.


1Password Version: 7.5
Extension Version: Not Provided
OS Version: macOS 10.15
Sync Type: Not Provided

Comments

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file