3

I have a remote linux box that I login to with ssh and chrome remote desktop. It is not super critical, mostly used for my hobby projects.

I have a pretty long password created using diceware. But it's getting tedious to type it repeatedly because in a given session I need to type it at least 4-5 times.

I have resolved this for SSH into the remote box by:

  • Using ssh keys.
  • Disabled entering the password when using sudo.

However, it's still a problem when logging in with Chrome Remote Desktop for unlocking the system.

To avoid typing this multiple times, I have tried the following:

  • Anytime I have to do sysadmin work, I change the password to a three letter word so I don't have to type the long one multiple times. Con: Easy to forget to change it back.

  • Program a macro in my mechanical keyboard that types it out. Con: Won't help if I'm using a laptop somewhere else.

Another option I considered was make/buy a tiny USB dongle that works as a HID and types the password, but with covid, I don't have access to facilities to help me make this.

Any ideas? I can't be the only one having this problem.

EDIT: Updated question to specify that the issue has been mitigated when using ssh.

5
  • Are using SSH keys an option?
    – cutrightjm
    Oct 1, 2021 at 4:15
  • Read man ssh-copy-id ssh-keygen ssh scp.
    – waltinator
    Oct 1, 2021 at 4:37
  • @cutrightjm @waltinator - I already use ssh keys for ssh. And I've set no password for sudo. But I need a desktop environment so I login with chrome remote desktop to use the various UI based tools. Can't get around typing the password there. Oct 1, 2021 at 4:45
  • 1
    @roaima - Thanks for calling that out, have updated my question! Oct 1, 2021 at 10:00
  • Disabling password prompts for all things sudo renders sudo almost pointless. You can make sudo remember that you have authenticated for a given period of time, which might be a reasonable compromise between convenience and security.
    – bxm
    Oct 1, 2021 at 11:08

2 Answers 2

2

Use an RFID tag or a barcode scanner.

For litte money (under $10) you can buy a USB RFID card reader that acts as a HID that will enter a password when presented with a tag. Some can be adjusted to append a newline at the end. The password will be the serial number of an RFID tag and is fixed but it has reasonable entropy.

A more flexible and more secure alternative would be a USB barcode scanner. Again it acts as a HID but here you can print your own passwords (as barcode, easy enough as there are open source tools for it) and you have more flexibility and configurability. A simple but reliable USB barcode reader sets you back $20 to $30. Used devices from POS terminals are available and in my experience often "just work".

1

I’d probably investigate using a password manager, such as Bitwarden (no affiliation, many other managers are available).

You can use such to synchronise passwords between devices, and when you want to use a password copy it to your clipboard.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .