VMware Cloud Community
sdextercn
Contributor
Contributor

Encrypted properties with newlines

I am using an encrypted property to store an SSH key to install using a software component. What is the correct way to store it in a property with the needed linefieeds?

Scott

Reply
0 Kudos
5 Replies
daphnissov
Immortal
Immortal

Have you tried the normal characters to see if they don't work?

Reply
0 Kudos
sdextercn
Contributor
Contributor

On a Linux VM I use an echo command to get the key into the needed file and it is created but the \n is replaced with spaces.

Reply
0 Kudos
daphnissov
Immortal
Immortal

You may need to use sed in the configure phase to apply those line feeds.

Reply
0 Kudos
sdextercn
Contributor
Contributor

It seems no matter what i put in, it really doesn't like having the \n in actions (for the sed portion) or baked into the property itself.

Reply
0 Kudos
daphnissov
Immortal
Immortal

Try creating a variable and specifying \n as a literal string, then using sed to replace using that variable. If you give me a better idea exactly what you're trying to put in and where I can possibly test.

Reply
0 Kudos