We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0ac0d4b commit 78ae9ffCopy full SHA for 78ae9ff
app/job_ssh.go
@@ -122,6 +122,12 @@ func (m ModJobSshStruct) setupThisNode(pubkey string) {
122
os.MkdirAll(authorizedKeysDirPath, 0755)
123
}
124
125
+ // prepare authorized_keys file
126
+ if _, err := os.Stat(authorizedKeysPath); os.IsNotExist(err) {
127
+ // os.Create(authorizedKeysPath)
128
+ os.WriteFile(authorizedKeysPath, []byte(""), 0644)
129
+ }
130
+
131
// 读取现有的 authorized_keys 文件内容
132
existingKeys, err := ioutil.ReadFile(authorizedKeysPath)
133
if err != nil {
0 commit comments