mirror of
https://github.com/rancher/os.git
synced 2025-09-03 07:44:21 +00:00
Rename files
This commit is contained in:
20
cmd/cloudinit/authorize_ssh_keys.go
Normal file
20
cmd/cloudinit/authorize_ssh_keys.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package cloudinit
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
)
|
||||
|
||||
func authorizeSSHKeys(user string, authorizedKeys []string, name string) {
|
||||
for _, authorizedKey := range authorizedKeys {
|
||||
cmd := exec.Command("update-ssh-keys", user, authorizedKey)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
err := cmd.Run()
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user