change tab to 4 spaces + add ssh-keyscan
This commit is contained in:
parent
10369f18f9
commit
d7a4769ec0
@ -28,6 +28,7 @@ EOF
|
|||||||
REMOTEKEY=$(su - oneadmin -c "ssh ${host} 'cat ~oneadmin/.ssh/id_rsa.pub'")
|
REMOTEKEY=$(su - oneadmin -c "ssh ${host} 'cat ~oneadmin/.ssh/id_rsa.pub'")
|
||||||
if ! grep -qs "$REMOTEKEY" ~oneadmin/.ssh/authorized_keys; then
|
if ! grep -qs "$REMOTEKEY" ~oneadmin/.ssh/authorized_keys; then
|
||||||
su - oneadmin -c "echo ${REMOTEKEY} >> ~oneadmin/.ssh/authorized_keys"
|
su - oneadmin -c "echo ${REMOTEKEY} >> ~oneadmin/.ssh/authorized_keys"
|
||||||
|
su - oneadmin -c "ssh-keyscan $host"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user