HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/usermin/ssh/list_keys.cgi
#!/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;
}