How do I automate this in bash?
I'm trying to find a way to do this in a bash script instead of manually typing 'yes' when ssh asks:
I tried this, but it didn't work:
$ ssh `hostname` # enter "yes"
$ ssh localhost # enter "yes"
It still waits here for me to type something:
echo "yes\nexit\n" > $(ssh `hostname`)
The authenticity of host 'myhost (10.1.2.3)' can't be established.
RSA key fingerprint is 32:5d:aa:67:1f:76:bb:68:dd:d2:79:39:cc:21:ee:e0.
Are you sure you want to continue connecting (yes/no)?