diff --git a/plinth/modules/backups/forms.py b/plinth/modules/backups/forms.py
index e118b7eeb..faf5e0e2e 100644
--- a/plinth/modules/backups/forms.py
+++ b/plinth/modules/backups/forms.py
@@ -253,31 +253,27 @@ class AddRemoteRepositoryForm(EncryptedBackupsMixin, forms.Form):
validators=[repository_validator])
ssh_auth_type = forms.ChoiceField(
label=_('SSH Authentication Type'),
- help_text=_('How to authenticate to the remote SSH server.
'
- 'If Key-based Authentication is selected, then the '
- "FreedomBox service's SSH client public key must be added"
- " to the authorized keys list on the remote server.
"
- 'If Password-based Authentication is selected, then '
- 'FreedomBox will attempt to copy its SSH client public '
- 'key to the remote server.'), widget=forms.RadioSelect(),
+ help_text=_('Choose how to authenticate to the remote SSH server.'),
+ widget=forms.RadioSelect(),
choices=[('key_auth', _('Key-based Authentication')),
('password_auth', _('Password-based Authentication'))])
ssh_password = forms.CharField(
label=_('SSH server password'), widget=forms.PasswordInput(),
- strip=True,
- help_text=_('Required only for password-based authentication.'),
+ strip=True, help_text=_('Required for password-based authentication.'),
required=False)
field_order = ['repository', 'ssh_auth_type', 'ssh_password'
] + encryption_fields
def clean(self):
+ """Perform additional checks on form data."""
super().clean()
ssh_password = self.cleaned_data.get('ssh_password')
if self.cleaned_data.get(
'ssh_auth_type') == 'password_auth' and not ssh_password:
raise forms.ValidationError(
_('SSH password is needed for password-based authentication.'))
+
return self.cleaned_data
def clean_repository(self):