aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrtr-origin/server.sh23
-rw-r--r--rtr-origin/sshd.conf24
2 files changed, 47 insertions, 0 deletions
diff --git a/rtr-origin/server.sh b/rtr-origin/server.sh
new file mode 100755
index 00000000..09ddf733
--- /dev/null
+++ b/rtr-origin/server.sh
@@ -0,0 +1,23 @@
+#!/bin/sh -
+#
+# Wrapper for rtr-origin.py in server mode, for testing.
+#
+# In production we would probably want to handle all of this either
+# directly in the Python code or in the command= setting for a
+# particular ssh key, but for initial testing it's simpler to run a
+# shall script to change to the right directory and supply any
+# necessary command line arguments.
+#
+# Be warned that almost any error here will cause the subsystem to
+# fail mysteriously, leaving behind naught but a SIGCHILD log message
+# from sshd as this script dies.
+
+#/usr/bin/printenv >> /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/server.log
+
+#echo '[Server starting up]' >> /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/server.log
+
+cd /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/
+
+#/usr/local/bin/python rtr-origin.py server >> /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/server.log 2>&1
+
+exec /usr/local/bin/python rtr-origin.py server 2>> /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/server.log
diff --git a/rtr-origin/sshd.conf b/rtr-origin/sshd.conf
new file mode 100644
index 00000000..c6243cbb
--- /dev/null
+++ b/rtr-origin/sshd.conf
@@ -0,0 +1,24 @@
+# $Id$
+#
+# sshd config file for testing. Invoke thusly:
+#
+# /usr/sbin/sshd -f /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/sshd.conf -d
+
+Port 2222
+Protocol 2
+ListenAddress 127.0.0.1
+ListenAddress ::1
+HostKey /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/ssh_host_rsa_key
+PermitRootLogin no
+PubkeyAuthentication yes
+#AuthorizedKeysFile /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/authorized_keys
+PasswordAuthentication no
+PermitEmptyPasswords no
+ChallengeResponseAuthentication no
+UsePAM no
+AllowTcpForwarding no
+X11Forwarding no
+UseDNS no
+PidFile /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/sshd.pid
+Subsystem rpki-rtr /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/server.sh
+#Subsystem sftp /usr/libexec/sftp-server