From 6f9af717ad58280cb10b0c617dd9e0a181193aa3 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Wed, 13 Feb 2019 13:44:26 -0800 Subject: [PATCH] ec2config: add public IP to SSH command output Signed-off-by: Gyuho Lee --- ec2config/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ec2config/config.go b/ec2config/config.go index 568573fdf..aa714a1ad 100644 --- a/ec2config/config.go +++ b/ec2config/config.go @@ -511,7 +511,7 @@ 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_ @@ -519,7 +519,7 @@ scp -i %s %s@%s:_REMOTE_PATH_ _LOCAL_PATH_ 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,