Skip to content

Commit

Permalink
ec2config: add public IP to SSH command output
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed Feb 13, 2019
1 parent 4250aa6 commit 6f9af71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ec2config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -511,15 +511,15 @@ chmod 400 %s
`, cfg.KeyPath)

for _, v := range cfg.Instances {
s += fmt.Sprintf(`# ssh into remote machine (private IP %q)
s += fmt.Sprintf(`# ssh into remote machine (public IP %q, private IP %q)
ssh -o "StrictHostKeyChecking no" -i %s %s@%s
# download to local machine
scp -i %s %s@%s:_REMOTE_PATH_ _LOCAL_PATH_
# upload to remote machine
scp -i %s _LOCAL_PATH_ %s@%s:_REMOTE_PATH_
`,
v.PrivateIP,
v.PublicIP, v.PrivateIP,
cfg.KeyPath, cfg.UserName, v.PublicDNSName,
cfg.KeyPath, cfg.UserName, v.PublicDNSName,
cfg.KeyPath, cfg.UserName, v.PublicDNSName,
Expand Down

0 comments on commit 6f9af71

Please sign in to comment.