20 lines
295 B
Bash
Executable File
20 lines
295 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
if [[ ! -z "${JIANMU_SSH_PRIVATE_KEY}" ]]; then
|
|
|
|
|
|
mkdir -p ~/.ssh
|
|
chmod 700 ~/.ssh
|
|
echo -e "${JIANMU_SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa
|
|
chmod 600 ~/.ssh/id_rsa
|
|
set -x
|
|
|
|
|
|
ssh_expect
|
|
|
|
else
|
|
echo "ERROR!Parameter is missing, ssh_private_key is required."
|
|
exit 1
|
|
fi |