diff --git a/assets/translations/en.json b/assets/translations/en.json index 82f682ba..d6c03a87 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -83,7 +83,7 @@ "no_key_name": "Unnamed key", "root_title": "These are superuser keys", "root_subtitle": "Owners of these keys get full access to the server and can do anything on it. Only add your own keys to the server.", - "input_label": "Public ED25519 or RSA key" + "input_label": "Public ED25519, ECDSA or RSA key" }, "onboarding": { "page1_title": "Digital independence, available to all of us", diff --git a/lib/logic/cubit/forms/user/ssh_form_cubit.dart b/lib/logic/cubit/forms/user/ssh_form_cubit.dart index 707e54c3..3305d647 100644 --- a/lib/logic/cubit/forms/user/ssh_form_cubit.dart +++ b/lib/logic/cubit/forms/user/ssh_form_cubit.dart @@ -12,7 +12,7 @@ class SshFormCubit extends FormCubit { required this.user, }) { final RegExp keyRegExp = RegExp( - r'^(ssh-rsa AAAAB3NzaC1yc2|ssh-ed25519 AAAAC3NzaC1lZDI1NTE5)[0-9A-Za-z+/]+[=]{0,3}( .*)?$', + r'^(ecdsa-sha2-nistp256 AAAAE2VjZH|ssh-rsa AAAAB3NzaC1yc2|ssh-ed25519 AAAAC3NzaC1lZDI1NTE5)[0-9A-Za-z+/]+[=]{0,3}( .*)?$', ); key = FieldCubit(