blob: 581f73eca5cef5dcb0784b17e79034213128611b [file] [log] [blame]
#!/bin/bash
# Copyright 2015 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.
# Copy ssh test keys to BUILD_DIR so that they can be archived by utilities like
# chromite. As a side effect, this script also removes the private ssh key from
# rootfs.
cp "${ROOT_FS_DIR}"/usr/share/chromeos-ssh-config/keys/id_rsa* "${BUILD_DIR}"
sudo chmod 644 "${BUILD_DIR}"/id_rsa*
sudo rm -f "${ROOT_FS_DIR}"/usr/share/chromeos-ssh-config/keys/id_rsa
sudo rm -f "${ROOT_FS_DIR}"/root/.ssh/id_rsa