blob: fb17e79ce44dbd508395bc1f0678fa36865b21ed [file] [log] [blame]
#!/bin/bash
# Copyright 2015 The ChromiumOS Authors
# 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