From 432be30d609cdd68e786f5c8639d16e93b77f2fd Mon Sep 17 00:00:00 2001
From: short <>
Date: Wed, 8 Oct 2003 10:29:26 +0000
Subject: [PATCH] +ssht
---
configure.ac | 1 +
project/Makefile.am | 3 +-
project/ssht/Index.html.pl | 78 ++++++++++++++++++++++++++++++++++++++++++++++
project/ssht/ListItem.pm | 51 ++++++++++++++++++++++++++++++
project/ssht/Makefile.am | 23 ++++++++++++++
5 files changed, 155 insertions(+), 1 deletion(-)
create mode 100755 project/ssht/Index.html.pl
create mode 100755 project/ssht/ListItem.pm
create mode 100644 project/ssht/Makefile.am
diff --git a/configure.ac b/configure.ac
index 01a1577..401f894 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,6 +87,7 @@ Makefile
./project/QueryDev/Makefile
./project/SClock/Makefile
./project/ResRAM/Makefile
+./project/ssht/Makefile
])
echo done.
diff --git a/project/Makefile.am b/project/Makefile.am
index 982d2a2..6b1ebca 100644
--- a/project/Makefile.am
+++ b/project/Makefile.am
@@ -70,7 +70,8 @@ SUBDIRS= \
kewensis \
QueryDev \
SClock \
- ResRAM
+ ResRAM \
+ ssht
EXTRA_DIST+= \
Index.html.pl \
diff --git a/project/ssht/Index.html.pl b/project/ssht/Index.html.pl
new file mode 100755
index 0000000..319a299
--- /dev/null
+++ b/project/ssht/Index.html.pl
@@ -0,0 +1,78 @@
+#! /usr/bin/perl
+#
+# $Id$
+# Main page of 'My::Project::ssht'
+# Copyright (C) 2003 Jan Kratochvil
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; exactly version 2 of June 1991 is required
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+package project::ssht::Index;
+require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway
+our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
+our $CVS_ID=q$Id$;
+use strict;
+use warnings;
+
+BEGIN{ open F,"Makefile"; our $top_dir=pop @{[split /\s/,(grep /^top_srcdir/,)[0]]}; eval "use lib '$top_dir'"; close F; }
+use My::Web;
+Wuse 'My::Project';
+Wuse 'project::ssht::ListItem';
+
+
+My::Project->init_project(
+ "__PACKAGE__"=>__PACKAGE__,
+ "ListItem"=>\@project::ssht::ListItem::ListItem,
+ );
+
+
+my $cvsfile=sub ($) {
+my($file)=@_;
+
+ return a_href $W->{"project_viewcvs"}.'/*checkout*/ssht/hostintranet/etc-inittab?rev=HEAD',
+ CGI::escapeHTML($file);
+};
+
+print <<"HERE";
+
+
+ -
+
Replace all strings hostintranet by the name of your firewalled
+ intranet machine (without any dots - it must be valid string token).
+
+ -
+
Replace all strings public.internet.com by the hostname of your
+ server in public Internet. Replace 1.2.3.4-IP-of-public.internet.com
+ with IP address of this host
+
+ - Generate new keypair by 'ssh-keygen -t dsa'.
+ Place its public key part to
+ @{[ &{$cvsfile}('public.internet.com/home-hostintranet-ssht/.ssh/authorized_keys') ]}.
+ Place its private key part to
+ @{[ &{$cvsfile}('hostintranet/public.internet.com--hostintranet-ssht--identity') ]}.
+ Protect this file by 'chmod 600 hostintranet/public.internet.com--hostintranet-ssht--identity'.
+
+ Append line from @{[ &{$cvsfile}('public.internet.com/etc-passwd') ]}
+ to the file /etc/passwd on your server in public Internet.
+
+
+ Append line from @{[ &{$cvsfile}('hostintranet/etc-inittab') ]} to
+ the file /etc/inittab on your firewalled intranet machine.
+ Execute 'init q' command there.
+
+
+HERE
+
+
+My::Web->footer();
diff --git a/project/ssht/ListItem.pm b/project/ssht/ListItem.pm
new file mode 100755
index 0000000..f4b42f7
--- /dev/null
+++ b/project/ssht/ListItem.pm
@@ -0,0 +1,51 @@
+#! /usr/bin/perl
+#
+# $Id$
+# Definition of 'My::Project::ssht' for list.cgi.pl
+# Copyright (C) 2003 Jan Kratochvil
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; exactly version 2 of June 1991 is required
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+package project::ssht::ListItem;
+require 5.6.0; # at least 'use warnings;' but we need some 5.6.0+ modules anyway
+our $VERSION=do { my @r=(q$Revision$=~/\d+/g); sprintf "%d.".("%03d"x$#r),@r; };
+our $CVS_ID=q$Id$;
+use strict;
+use warnings;
+
+use My::Web;
+
+
+our @ListItem=(
+ "name"=>"ssht",
+ "platform"=>"unixuser",
+ "priority"=>4,
+ "cvs"=>"ssht",
+ "summary"=>'Intranet host accessibility by '.a_href('http://www.openssh.org/','SSH').' tunnel',
+ "license"=>"PD",
+ "maintenance"=>"ready",
+ "sponsorship"=>a_href('http://www.jklabs.cz/','JKLabs'),
+ "language"=>"bash",
+ "description"=><<"HERE",
+Do you need to admin remote host placed in the intranet behind enemy firewall?
+If you are able to set up port forward on the firewalling you are done.
+In the case of HTTP-only proxy you cannot use these scripts - look elsewhere.
+If the firewall performat NAT (masquerade) where you can connect from
+the intranet to the outer world by @{[ a_href 'http://www.openssh.org/','SSH' ]}
+you can use these security safe (TODO: chroot) scripts.
+HERE
+ );
+
+1;
diff --git a/project/ssht/Makefile.am b/project/ssht/Makefile.am
new file mode 100644
index 0000000..c6838b9
--- /dev/null
+++ b/project/ssht/Makefile.am
@@ -0,0 +1,23 @@
+# $Id$
+# automake source for the Makefile of project/ssht/ subdir
+# Copyright (C) 2003 Jan Kratochvil
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; exactly version 2 of June 1991 is required
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+include $(top_srcdir)/Makefile-head.am
+
+EXTRA_DIST+= \
+ ListItem.pm \
+ Index.html.pl
--
1.8.3.1