summaryrefslogtreecommitdiffstats
path: root/abs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run
diff options
context:
space:
mode:
Diffstat (limited to 'abs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run')
-rwxr-xr-xabs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run17
1 files changed, 5 insertions, 12 deletions
diff --git a/abs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run b/abs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run
index a019e5d..fc22e3b 100755
--- a/abs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run
+++ b/abs/mv-core/runit-scripts-mv/runitscripts/services/sshd/run
@@ -1,20 +1,13 @@
#!/bin/bash
exec 2>&1
-nobodydir=/data/srv/.nobody_ssh
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting SSH"
[ -f /etc/ssh/ssh_host_key ] || { /usr/bin/ssh-keygen -t rsa1 -N "" -f /etc/ssh/ssh_host_key >/dev/null; }
[ -f /etc/ssh/ssh_host_rsa_key ] || { /usr/bin/ssh-keygen -t rsa -N "" -f /etc/ssh/ssh_host_rsa_key >/dev/null; }
[ -f /etc/ssh/ssh_host_dsa_key ] || { /usr/bin/ssh-keygen -t dsa -N "" -f /etc/ssh/ssh_host_dsa_key >/dev/null; }
-if [ ! -f $nobodydir/id_dsa.pub ]
-then
- mkdir -p $nobodydir
- ssh-keygen -t dsa -N '' -f $nobodydir/id_dsa
- mkdir -p /data/home/mythtv/.ssh
- cp $nobodydir/id_dsa.pub /data/home/mythtv/.ssh/authorized_keys
- chmod 700 /data/home/mythtv/.ssh/
- chown -R mythtv:mythtv /data/home/mythtv/.ssh/
-fi
-chown -R nobody:nobody $nobodydir
-chmod 700 $nobodydir
+
exec /usr/sbin/sshd -D >/dev/null 2>/dev/null