Ensure key format is PEM in beaker tests

Change-Id: If77a8b05f74a65466fb79d7c066e889540acd980
This commit is contained in:
Tobias Urdin 2020-07-16 20:24:22 +02:00
parent 64605e1273
commit a69725e973
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@
echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
mkdir -p .ssh mkdir -p .ssh
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P "" ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P "" -m PEM
sudo mkdir -p /root/.ssh sudo mkdir -p /root/.ssh
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
if [[ -f /usr/bin/yum || -f /usr/bin/dnf ]]; then if [[ -f /usr/bin/yum || -f /usr/bin/dnf ]]; then

View File

@ -9,7 +9,7 @@
echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
mkdir -p .ssh mkdir -p .ssh
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P "" ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P "" -m PEM
sudo mkdir -p /root/.ssh sudo mkdir -p /root/.ssh
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
if [[ -f /usr/bin/yum || -f /usr/bin/dnf ]]; then if [[ -f /usr/bin/yum || -f /usr/bin/dnf ]]; then