| Server IP : 104.21.25.180 / Your IP : 104.23.197.123 Web Server : Apache/2.4.37 System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64 User : ricodeal ( 1046) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/libexec/usermin/ssh/ |
Upload File : |
#!/usr/bin/perl
# Display all the user's private keys
require './ssh-lib.pl';
&ui_print_header(undef, $text{'lkeys_title'}, "");
@keys = &list_ssh_keys();
print "$text{'lkeys_desc'}<br>\n";
# Show a table of them
@table = ( );
foreach $k (@keys) {
push(@table, [
"<a href='edit_key.cgi?file=$k->{'private_file'}'>".
$text{'index_'.$k->{'type'}}."</a>",
&remove_homedir($k->{'private_file'}),
&remove_homedir($k->{'public_file'}),
]);
$got{$k->{'type'}} = 1;
}
print &ui_columns_table([ $text{'lkeys_type'},
$text{'lkeys_private'},
$text{'lkeys_public'} ], 100, \@table);
# Show form to generate, if any are missing
@missing_types = grep { !$got{$_} } @ssh_key_types;
if (@missing_types) {
print &ui_hr();
print $text{'lkeys_new'},"<p>\n";
print &ui_form_start("setup.cgi", "post");
print &ui_table_start(undef, undef, 2);
# Key type
print &ui_table_row($text{'index_type'},
&ui_select("type", "dsa",
[ map { [ $_, $text{'index_'.$_} ] }
@missing_types ]));
# Passphrase
print &ui_table_row($text{'index_pass'},
&ui_password("pass", undef, 25));
print &ui_table_end();
print &ui_form_end([ [ undef, $text{'lkeys_sok2'} ] ]);
}
&ui_print_footer("", $text{'index_return'});
sub remove_homedir
{
local ($f) = @_;
$f =~ s/^\Q$remote_user_info[7]\E/\~/;
return $f;
}