Do not enable "set username and password" automatically if public key auth is used
This commit is contained in:
+9
-5
@@ -174,6 +174,9 @@ Popup {
|
||||
text: qsTr("Allow public-key authentication only")
|
||||
onCheckedChanged: {
|
||||
if (checked) {
|
||||
if (chkSetUser.checked && fieldUserName.text == "pi" && fieldUserPassword.text.length == 0) {
|
||||
chkSetUser.checked = false
|
||||
}
|
||||
fieldPublicKey.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
@@ -462,6 +465,12 @@ Popup {
|
||||
fieldHostname.text = settings.hostname
|
||||
chkHostname.checked = true
|
||||
}
|
||||
if ('sshAuthorizedKeys' in settings) {
|
||||
fieldPublicKey.text = settings.sshAuthorizedKeys
|
||||
radioPubKeyAuthentication.checked = true
|
||||
chkSSH.checked = true
|
||||
}
|
||||
|
||||
if ('sshUserPassword' in settings) {
|
||||
fieldUserPassword.text = settings.sshUserPassword
|
||||
fieldUserPassword.alreadyCrypted = true
|
||||
@@ -477,11 +486,6 @@ Popup {
|
||||
fieldUserName.text = settings.sshUserName
|
||||
chkSetUser.checked = true
|
||||
}
|
||||
if ('sshAuthorizedKeys' in settings) {
|
||||
fieldPublicKey.text = settings.sshAuthorizedKeys
|
||||
chkSSH.checked = true
|
||||
radioPubKeyAuthentication.checked = true
|
||||
}
|
||||
if ('wifiSSID' in settings) {
|
||||
fieldWifiSSID.text = settings.wifiSSID
|
||||
if ('wifiSSIDHidden' in settings && settings.wifiSSIDHidden) {
|
||||
|
||||
Reference in New Issue
Block a user