So I have an RSA token set in my environment variable.
I want to set it in the environment of the remote machine.
I tried this below script to set, but it only sets first line
-----BEGIN OPENSSH PRIVATE KEY-----:
#!/usr/bin/expect -f spawn ssh -tt ec2-user@$::env(EC2_INSTANCE) send "export RSA_KEY=$::env(MY_KEY)\r" expect -re ".*\$"
How can I set the whole content?