Skip to content

send-ssh-public-key param is unable to find file when full path is specified in git bash #6943

Description

@John9570

Describe the bug

When calling aws ec2-instance-connect send-ssh-public-key command, I am unable to specify a full path to my ssh-public-key file in git bash

Expected Behavior

the ssh-public-key file is found by the parameter

Current Behavior

The file is not found, here is the output:

$ aws ec2-instance-connect send-ssh-public-key  --instance-id i-xxxx --instance-os-user ec2-user  --ssh-public-key file:///c/Users/john.marshall/.ssh/id_rsa.pub

Error parsing parameter '--ssh-public-key': Unable to load paramfile file:///c/Users/john.marshall/.ssh/id_rsa.pub: [Errno 2] No such file or directory: '/c/Users/john.marshall/.ssh/id_rsa.pub'

Reproduction Steps

In git bash on windows, try specifying a full path to your ssh-public key file using the below command:

aws ec2-instance-connect send-ssh-public-key --instance-id i-xxxx --instance-os-user ec2-user --ssh-public-key file://<path>

Possible Solution

I'm not sure if the path is being incorrectly interpreted? I have noticed that as a work-around I am able to specify a relative path and that works fine:

aws ec2-instance-connect send-ssh-public-key --instance-id i-xxxx --instance-os-user ec2-user --ssh-public-key file://~/.ssh/id_rsa.pub

Additional Information/Context

No response

CLI version used

aws-cli/1.22.98 Python/3.10.4 Windows/10 botocore/1.24.43

Environment details (OS name and version, etc.)

Windows 11

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions