Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
youyo committed Nov 29, 2021
1 parent 1a7f76f commit dd1ae2f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"regexp"
"strings"
"time"

"github.com/k1LoW/duration"
"github.com/manifoldco/promptui"
Expand Down Expand Up @@ -75,12 +76,12 @@ func Run(cmd *cobra.Command, args []string) (err error) {
}
defer cmdPortForwarding.Process.Kill()

waitOpenPort(ConnectHost, localPort)

if err = sendSSHPublicKey(ctx, awsSession, instanceID, viper.GetString("username"), viper.GetString("publicKey")); err != nil {
return err
}

time.Sleep(1 * time.Second)

cmdSsh, err := execSshCommand(ctx, viper.GetString("username"), ConnectHost, localPort, viper.GetString("identity-file"))
cmdSsh.Wait()

Expand Down

0 comments on commit dd1ae2f

Please sign in to comment.