blob: 01e355ac1ee50bc256723435077c59a878fa6c85 [file] [log] [blame]
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Start sshd to allow remote network login"
author ""
# This must start after the iptables job so that when we enable
# port 22 below, the change won't be overwritten.
# By default, this job is only configured to start automatically in
# test images.
#for_test start on stopped iptables
expect fork
pre-start script
mkdir -p ${SSH_DIR}
for KEY_TYPE in rsa dsa ; do
if [ ! -f ${KEY_FILE} ] ; then
ssh-keygen -q -f ${KEY_FILE} -N '' -t ${KEY_TYPE}
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
end script
exec /usr/sbin/sshd