Skip to content

Commit

Permalink
fix(native): fix default --ssh-password problem
Browse files Browse the repository at this point in the history
Signed-off-by: Jason-ZW <zhenyang@rancher.com>
  • Loading branch information
rancher-sy-bot authored and Jason-ZW committed Feb 21, 2022
1 parent 656441d commit 88ddb3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/providers/native/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ func (p *Native) GetCredentialFlags() []types.Flag {
// GetSSHConfig return native ssh config.
func (p *Native) GetSSHConfig() *types.SSH {
ssh := &types.SSH{
SSHUser: defaultUser,
SSHPort: "22",
SSHKeyPath: defaultSSHKeyPath,
SSHUser: defaultUser,
SSHPort: "22",
}
return ssh
}
Expand Down
1 change: 1 addition & 0 deletions pkg/providers/native/native.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func (p *Native) CreateCheck() error {
if p.MasterIps == "" {
return fmt.Errorf("[%s] cluster must have one master when create", p.GetProviderName())
}

// check file exists.
if p.SSHKeyPath != "" {
sshPrivateKey := p.SSHKeyPath
Expand Down

0 comments on commit 88ddb3f

Please sign in to comment.