Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Commit63f6ec3

Browse files
authored
fix: use 0600 for private key in config-ssh (#235)
1 parent1a85240 commit63f6ec3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎internal/cmd/configssh.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ func configSSH(configpath *string, remove *bool) func(cmd *cobra.Command, _ []st
8181
iferr!=nil {
8282
returnxerrors.Errorf("write to ssh config file %q: %s",*configpath,err)
8383
}
84+
_=os.Remove(privateKeyFilepath)
8485

8586
returnnil
8687
}
@@ -170,7 +171,7 @@ func writeSSHKey(ctx context.Context, client *coder.Client, privateKeyPath strin
170171
iferr!=nil {
171172
returnerr
172173
}
173-
returnioutil.WriteFile(privateKeyPath, []byte(key.PrivateKey),0400)
174+
returnioutil.WriteFile(privateKeyPath, []byte(key.PrivateKey),0600)
174175
}
175176

176177
funcmakeNewConfigs(userNamestring,envs []coderutil.EnvWithPool,privateKeyFilepathstring)string {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp