mirror of
https://github.com/moul/sshportal.git
synced 2025-01-11 09:59:39 +08:00
Fix userkey create, missing AuthorizedKey
This commit is contained in:
parent
2cdc19dfdd
commit
3d5101011f
1 changed files with 6 additions and 3 deletions
3
shell.go
3
shell.go
|
@ -16,6 +16,8 @@ import (
|
|||
"github.com/mgutz/ansi"
|
||||
"github.com/moby/moby/pkg/namesgenerator"
|
||||
"github.com/moul/ssh"
|
||||
gossh "golang.org/x/crypto/ssh"
|
||||
|
||||
"github.com/olekukonko/tablewriter"
|
||||
"github.com/urfave/cli"
|
||||
"golang.org/x/crypto/ssh/terminal"
|
||||
|
@ -1928,6 +1930,7 @@ GLOBAL OPTIONS:
|
|||
User: &user,
|
||||
Key: key.Marshal(),
|
||||
Comment: comment,
|
||||
AuthorizedKey: string(gossh.MarshalAuthorizedKey(key)),
|
||||
}
|
||||
if c.String("comment") != "" {
|
||||
userkey.Comment = c.String("comment")
|
||||
|
|
Loading…
Reference in a new issue