mirror of
https://github.com/rancher/os.git
synced 2025-07-01 09:11:48 +00:00
18 lines
334 B
Go
18 lines
334 B
Go
|
package cloudinit
|
||
|
|
||
|
import(
|
||
|
"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)
|
||
|
err := cmd.Run()
|
||
|
if err != nil {
|
||
|
log.Fatal(err.Error())
|
||
|
}
|
||
|
}
|
||
|
}
|