Try the following:
echo $KEY | ssh -i /dev/stdin username@host command
The key doesn’t appear from a PS statement, but because stdin is redirected it’s only useful for single commands or tunnels.
Try the following:
echo $KEY | ssh -i /dev/stdin username@host command
The key doesn’t appear from a PS statement, but because stdin is redirected it’s only useful for single commands or tunnels.