install: add insecure cipher options for older devices/firmwares

Requires explicit choice via flag

fixes: https://github.com/gregtwallace/apc-p15-tool/issues/1
This commit is contained in:
Greg T. Wallace 2024-02-04 17:09:23 -05:00
parent 357503382b
commit 598c4ba9f7
2 changed files with 21 additions and 5 deletions
pkg/app

View file

@ -32,10 +32,11 @@ type config struct {
}
install struct {
keyCertPemCfg
hostAndPort *string
fingerprint *string
username *string
password *string
hostAndPort *string
fingerprint *string
username *string
password *string
insecureCipher *bool
}
}
@ -92,6 +93,7 @@ func (app *app) getConfig(args []string) error {
cfg.install.fingerprint = installFlags.StringLong("fingerprint", "", "the SHA256 fingerprint value of the ups' ssh server")
cfg.install.username = installFlags.StringLong("username", "", "username to login to the apc ups")
cfg.install.password = installFlags.StringLong("password", "", "password to login to the apc ups")
cfg.install.insecureCipher = installFlags.BoolLong("insecurecipher", "allows the use of insecure ssh ciphers (NOT recommended)")
installCmd := &ff.Command{
Name: "install",