Force overwriting existing ssh keys
Change-Id: I5acda250e2c134918d8c22e8b010e20cfc3f9b33 (cherry picked from commit25bff52a31
) (cherry picked from commita37e1b99ae
) (cherry picked from commita640aadc4b
) (cherry picked from commiteaa2921e19
)
This commit is contained in:
parent
7a7b29c1d7
commit
5e74560267
|
@ -10,7 +10,7 @@
|
|||
echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config
|
||||
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
|
||||
mkdir -p .ssh
|
||||
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P "" -m PEM
|
||||
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P "" -m PEM <<<y
|
||||
sudo mkdir -p /root/.ssh
|
||||
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
|
||||
if [[ -f /usr/bin/yum || -f /usr/bin/dnf ]]; then
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config
|
||||
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
|
||||
mkdir -p .ssh
|
||||
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P "" -m PEM
|
||||
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P "" -m PEM <<<y
|
||||
sudo mkdir -p /root/.ssh
|
||||
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
|
||||
if [[ -f /usr/bin/yum || -f /usr/bin/dnf ]]; then
|
||||
|
|
Loading…
Reference in New Issue