Skip to content

Credential Manager support for logon PW. Extended VT100 options

Choose a tag to compare

@MainframeDaze MainframeDaze released this 04 Mar 03:53
· 1 commit to main since this release

This release contains two groups of changes. The first would've been v2.2.0, adding the -C / --CredMgr option. Unlike saving a password in an environment variable or a plaintext file, Windows credential manager encrypts its contents and ties the decryption to the logon of the active user. -C is followed by the Internet or network address name used for a Generic Windows Credential (the user id may be left blank or have random text; we do not use it). The password pulled is supplied for the logon password.

Because SSHpass supports other utilities like SCP.exe, we only save the password in CredMgr, and let the user define whatever CredMgr retrieval key they want. Trying to parse the rest of the SSHPass command line for the user ID and server name would be prone to failure, so those are not included in CredMgr. You must still put them on the command line.

This has been tested against pfSense with SSH and SCP, and ADM on an ASUSTOR NAS (with SSH only).

The testing on ADM led to the features in 2.2.1: enabling ENABLE_VIRTUAL_TERMINAL_PROCESSING on STDOUT, not just STDIN. ADM outputs more advanced VT100 sequences than, for instance, pfSense, and without this change, use of keys like Backspace resulted in Ctrl Character garbage all over the screen.

As I worked on this I realized that there also devices that might lack VT100 support through SSH, so I added the -n / --nonVT100 option. Using this leaves everything as plain text on input and output (and adds DISABLE_NEWLINE_AUTO_RETURN to the VT100 case, but turns it off for non-VT100 cases). I have tested this mode on Unifi AP/AC Pro with SSH. On these devices it is best to run CLS to clear the CMD window before launching, else you may find your cursor at the top of the screen...

This release clears Issue #1 - Support for Windows Credential Manager