We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Brian, a user on the CDK Slack channel gave the following methods which avoid the .pem file problem:
Host myhost ProxyCommand sh -c "aws ec2-instance-connect send-ssh-public-key \ --instance-id $(aws ec2 describe-instances --filter "Name=tag:Name,Values= HOSTNAME" \ --query "Reservations[].Instances[?State.Name =='running'].InstanceId[]" \ --output text --profile profilename) \ --availability-zone ap-southeast-2a \ --instance-os-user ec2-user \ --ssh-public-key file:///Users/someuser/.ssh/somekey.pub --profile profilename > /dev/null; \ aws ssm start-session --profile profilename \ --target $(aws ec2 describe-instances --filter "Name=tag:Name,Values= HOSTNAME" \ --query "Reservations[].Instances[?State.Name =='running'].InstanceId[]" --output text --profile profilename) --profile profilename \ --document-name AWS-StartSSHSession --parameters 'portNumber=%p'" User ec2-user ForwardAgent yes UserKnownHostsFile /dev/null StrictHostKeyChecking no
Host myhost ProxyCommand C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe "aws ec2-instance-connect send-ssh-public-key \ --instance-id $(aws ec2 describe-instances --filter "Name=tag:Name,Values= HOSTNAME" \ --query "Reservations[].Instances[?State.Name =='running'].InstanceId[]" \ --output text --profile profilename) \ --availability-zone ap-southeast-2a \ --instance-os-user ec2-user \ --ssh-public-key file:///Users/someuser/.ssh/somekey.pub --profile profilename > /dev/null; \ aws ssm start-session --profile profilename \ --target $(aws ec2 describe-instances --filter "Name=tag:Name,Values= HOSTNAME" \ --query "Reservations[].Instances[?State.Name =='running'].InstanceId[]" --output text --profile profilename) --profile profilename \ --document-name AWS-StartSSHSession --parameters 'portNumber=%p'" User ec2-user ForwardAgent yes UserKnownHostsFile /dev/null StrictHostKeyChecking no
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi Brian, a user on the CDK Slack channel gave the following methods which avoid the .pem file problem:
The text was updated successfully, but these errors were encountered: