aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.03k stars 323 forks source link

Copying file content without displaying it? #530

Closed mikkoc closed 10 months ago

mikkoc commented 10 months ago

Hi there,

I'm not sure this can be addressed by SSM Agent, but it's worth a shot ;)

The goal is to copy some secret file content from an EC2 instance to the clipboard. In OSX, there is pbcopy:

cat secret.txt | pbcopy

And then paste it as needed from the clipboard. I can't find a good way to achieve this on AmazonLinux2 server, no X.

I would like to avoid having to copy the file to S3 and download from there, if possible.

Alternative question: is it possible to prevent some commands outputs from being logged by SSM Session manager? For example:

cat secret.txt

Thanks Mikko

sluggard76 commented 10 months ago

mikkoc,

We have created a feature request accordingly. Please note that we have a backlog of feature requests. We'll prioritize and work on those requests as they come in.