Add rm known hosts file to fix SFTP behaviour after key change
This commit is contained in:
@@ -27,6 +27,8 @@ sleep 2
|
||||
rm -rf /.SSH/automated/.temp/
|
||||
|
||||
##Attribute to self & restart sshd
|
||||
rm /home/$USER/.ssh/known_hosts
|
||||
rm /root/.ssh/known_hosts
|
||||
cat /.SSH/automated/priv/servers/id_ed25519 | tee /root/.ssh/id_ed25519
|
||||
cat /.SSH/automated/pub/servers/id_ed25519.pub | tee /root/.ssh/authorized_keys &&
|
||||
chmod 700 /root/.ssh/id_ed25519
|
||||
|
||||
Reference in New Issue
Block a user