#
# setup-openssh-keys.pl:
-# Adapts the installed gsi-ssh environment to the current machine,
-# performing actions that originally occurred during the package's
-# 'make install' phase.
+# Generates the host keys for the openssh install.
#
# Send comments/fixes/suggestions to:
# Chase Phillips <cphillip@ncsa.uiuc.edu>
$prefix = ${globusdir};
$exec_prefix = "${prefix}";
$bindir = "${exec_prefix}/bin";
-$mandir = "${prefix}/man";
-$mansubdir = "man";
-$libexecdir = "${exec_prefix}/libexec";
-$sysconfdir = "${prefix}/etc";
-$piddir = "/var/run";
-$xauth_path = "/usr/bin/X11/xauth";
-
$sysconfdir = "/etc";
sub runkeygen
return 0;
}
-fixpaths();
runkeygen();
-
-my $metadata = new Grid::GPT::Setup(package_name => "gsi_openssh_setup");
-
-$metadata->finish();
-
-print "$myname: Finished configuring package 'gsi_openssh'.\n";
$prefix = ${globusdir};
$exec_prefix = "${prefix}";
$bindir = "${exec_prefix}/bin";
+$sbindir = "${exec_prefix}/sbin";
$mandir = "${prefix}/man";
$mansubdir = "man";
$libexecdir = "${exec_prefix}/libexec";
"/usr/bin:/bin:/usr/sbin:/sbin" => "/usr/bin:/bin:/usr/sbin:/sbin:${bindir}",
"/path/to/scp.real" => "${bindir}/scp.real",
"/path/to/ssh" => "${bindir}/ssh",
+ "/path/to/sftp.real" => "${bindir}/sftp.real",
+ "/path/to/sshd.real" => "${sbindir}/sshd.real",
+ "/path/to/ssh_config" => "${sysconfdir}/ssh_config",
+ "/path/to/sshd_config" => "${sysconfdir}/sshd_config",
);
#
@files = (
"${bindir}/scp",
+ "${bindir}/sftp",
+ "${sbindir}/sshd",
"${sysconfdir}/ssh_config",
"${sysconfdir}/sshd_config",
"${sysconfdir}/moduli",
return 0;
}
-sub runkeygen
-{
- print "Generating ssh keys (if necessary)...\n";
- if ( -e "${sysconfdir}/ssh_host_key" )
- {
- print "${sysconfdir}/ssh_host_key already exists, skipping.\n";
- }
- else
- {
- # if $sysconfdir/ssh_host_key doesn't exist..
- system("$bindir/ssh-keygen -t rsa1 -f $sysconfdir/ssh_host_key -N \"\"");
- }
-
- if ( -e "${sysconfdir}/ssh_host_dsa_key" )
- {
- print "${sysconfdir}/ssh_host_dsa_key already exists, skipping.\n";
- }
- else
- {
- # if $sysconfdir/ssh_host_dsa_key doesn't exist..
- system("$bindir/ssh-keygen -t dsa -f $sysconfdir/ssh_host_dsa_key -N \"\"");
- }
-
- if ( -e "${sysconfdir}/ssh_host_rsa_key" )
- {
- print "${sysconfdir}/ssh_host_rsa_key already exists, skipping.\n";
- }
- else
- {
- # if $sysconfdir/ssh_host_rsa_key doesn't exist..
- system("$bindir/ssh-keygen -t rsa -f $sysconfdir/ssh_host_rsa_key -N \"\"");
- }
-
- return 0;
-}
-
fixpaths();
-runkeygen();
+
+print "---------------------------------------------------------------------\n";
+print "If you would also like to run the sshd binary that came with this\n";
+print "package and you do not have host keys located in /etc, run (as root):\n";
+print "\n";
+print " $setupdir/setup-openssh-keys\n";
+print "\n";
+print "This script creates machine-specific host keys in /etc that are\n";
+print "required by sshd.\n";
+print "---------------------------------------------------------------------\n";
my $metadata = new Grid::GPT::Setup(package_name => "gsi_openssh_setup");