This commit is contained in:
parent
ed7e00f86b
commit
d8a5a809eb
|
@ -16,7 +16,7 @@ get_distro() {
|
|||
}
|
||||
|
||||
setup_ssh() {
|
||||
echo "Setting up SSH"
|
||||
tput setaf 2; tput bold; echo "Setting up SSH"
|
||||
|
||||
mkdir -p $(dirname $ssh_authorized_keys_path)
|
||||
touch $ssh_authorized_keys_path
|
||||
|
@ -33,7 +33,7 @@ setup_ssh() {
|
|||
# whenever we got http://metadata resolving to url work successfully.
|
||||
|
||||
metadata=$(curl http://[2a0a:e5c1:144::]:5000)
|
||||
echo metadata
|
||||
echo "$metadata"
|
||||
echo "$metadata" | jq -r '.["ssh-key-list"] | .[]' > ssh-key-list.txt
|
||||
while read ssh_key; do
|
||||
if ! grep -q "$ssh_key" $ssh_authorized_keys_path; then
|
||||
|
|
Loading…
Reference in New Issue