I am working on some shell and I encountered the following line:
cat /ssh/sshkey | tr -d '\r' | ssh-add -
This code get a key and add it to an agent. This work on its current environment, but when I try it on another VM, I get the following:
Error loading key "(stdin)": invalid format
ssh-add expect a prompt with a passphrase, which I believe is what this error is about, but this is in a script and should work without one.
What am I missing ?