void-packages/srcpkgs/tinyssh/files/tinysshd/run

15 lines
542 B
Text
Raw Normal View History

2016-10-28 22:30:15 +00:00
#!/bin/sh
[ -r ./conf ] && . ./conf
# Override OPTS in conf. Suggested:
# OPTS='-x sftp=/usr/libexec/sftp-server -l -v'
# To run on a port other than 22, override SSHPORT.
# tinyssh-makekey doesn't have the -A option from ssh-keygen.
# What do we do when tinyssh decides to add new key types?
# Tomorrow's problem; cross that bridge when we come to it.
if [ ! -d /etc/tinyssh/sshkeydir ]; then
tinysshd-makekey -q /etc/tinyssh/sshkeydir
fi
exec tcpserver -HRDl0 0 ${SSHPORT:=22} tinysshd ${OPTS:=-l -v} /etc/tinyssh/sshkeydir 2>/dev/null