Expand admin SSH command capabilities
Add per-session history, tab completion, interactive prompts, and bounded input handling. Support deferred lifecycle and host-key actions after output drains, and document the expanded administration workflow.
This commit is contained in:
@@ -421,10 +421,6 @@ static int command_user_inner(int argc, char **argv)
|
||||
print_usage();
|
||||
return 1;
|
||||
}
|
||||
if (remote && !generated) {
|
||||
printf("Interactive password entry is restricted to physical UART0; use --generate.\n");
|
||||
return 1;
|
||||
}
|
||||
return add_user(argv[2], argv[3], generated);
|
||||
}
|
||||
if (argc == 4 && strcmp(argv[1], "delete") == 0 &&
|
||||
@@ -464,10 +460,6 @@ static int command_user_inner(int argc, char **argv)
|
||||
print_usage();
|
||||
return 1;
|
||||
}
|
||||
if (remote && !generated) {
|
||||
printf("Interactive password entry is restricted to physical UART0; use --generate.\n");
|
||||
return 1;
|
||||
}
|
||||
if (remote && generated && principal != NULL &&
|
||||
strlen(argv[2]) == principal->username_length &&
|
||||
memcmp(argv[2], principal->username, principal->username_length) == 0) {
|
||||
@@ -478,10 +470,6 @@ static int command_user_inner(int argc, char **argv)
|
||||
}
|
||||
if (argc == 4 && strcmp(argv[1], "key") == 0 &&
|
||||
strcmp(argv[2], "add") == 0) {
|
||||
if (remote) {
|
||||
printf("Interactive SSH key entry is restricted to physical UART0; provide type and Base64 arguments.\n");
|
||||
return 1;
|
||||
}
|
||||
return add_key(argv[3]);
|
||||
}
|
||||
if (argc == 6 && strcmp(argv[1], "key") == 0 &&
|
||||
|
||||
Reference in New Issue
Block a user