i have ssh-key, something like this
-----BEGIN RSA PRIVATE KEY----- my_super_secret_password -----END RSA PRIVATE KEY-----
Of course this key does not work. When i am doing manual things, something, like this
-----BEGIN RSA PRIVATE KEY-----
my_super_secret_password
-----END RSA PRIVATE KEY-----
It works. When i am deleting this -----BEGIN RSA PRIVATE KEY-----
and this -----END RSA PRIVATE KEY-----
, my ssh-key does not work.
So, the question. How, i can make automatically via some command, like sed
or awk
, or any other command, how can i make from this string
-----BEGIN RSA PRIVATE KEY----- my_super_secret_password -----END RSA PRIVATE KEY-----
these three strings
-----BEGIN RSA PRIVATE KEY-----
my_super_secret_password
-----END RSA PRIVATE KEY-----
Thanks for your help. If you know any other answer on this question, i am glad to hear you. The reason, why i need it, because i have secret keys storage in AWS Secret Manager
. So, this manager stores keys only in one line.