mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-04 01:48:23 +02:00
#2820 cp -ra
This commit is contained in:
parent
801f5fffd7
commit
bf551ec8e7
@ -150,7 +150,7 @@ if [ "$1" = "restore" ]; then
|
||||
if [ $(sudo ls ${DEFAULT_BASEDIR}/sshd/ssh_host_rsa_key 2>/dev/null | grep -c "ssh_host_rsa_key") -gt 0 ]; then
|
||||
echo "# restore sshd host keys from: $DEFAULT_BASEDIR/sshd"
|
||||
sudo rm -rf /etc/ssh/*
|
||||
sudo cp -a $DEFAULT_BASEDIR/sshd/* /etc/ssh/
|
||||
sudo cp -ra $DEFAULT_BASEDIR/sshd/* /etc/ssh/
|
||||
sudo chown -R root:root /etc/ssh
|
||||
sudo dpkg-reconfigure openssh-server
|
||||
sudo systemctl restart sshd
|
||||
@ -165,7 +165,7 @@ if [ "$1" = "restore" ]; then
|
||||
echo "# restore root use keys from: $DEFAULT_BASEDIR/ssh-root"
|
||||
sudo rm -rf /root/.ssh
|
||||
sudo mkdir /root/.ssh
|
||||
sudo cp -a $DEFAULT_BASEDIR/ssh-root/* /root/.ssh
|
||||
sudo cp -ra $DEFAULT_BASEDIR/ssh-root/* /root/.ssh
|
||||
sudo chown -R root:root /root/.ssh
|
||||
echo "# OK - ssh-root keys restore done"
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user