diff --git a/pkg/webconsole/command/ssh_command.go b/pkg/webconsole/command/ssh_command.go index 3988c2a03b..05aa9fea17 100644 --- a/pkg/webconsole/command/ssh_command.go +++ b/pkg/webconsole/command/ssh_command.go @@ -31,7 +31,7 @@ type SSHtoolSol struct { func getCommand(ctx context.Context, userCred mcclient.TokenCredential, ip string) (string, *BaseCommand, error) { cmd := NewBaseCommand(o.Options.SshToolPath) s := auth.GetAdminSession(o.Options.Region, "v2") - key, err := modules.Sshkeypairs.GetById(s, userCred.GetProjectId(), jsonutils.NewDict()) + key, err := modules.Sshkeypairs.GetById(s, userCred.GetProjectId(), jsonutils.Marshal(map[string]bool{"admin": true})) if err != nil { return "", nil, err }