Look no further! It's not a problem with you, it's a problem with SSH client. The issue is that your private key file is missing the trailing newline and ssh just can't understand that file thinking that it's been encrypted with a passprhase -- what a dork!
your debug output would be like this:
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug2: no passphrase given, try next key
OR with strace -fx ssh-keygen -y -f KEY
:
Enter passphrase: Load key "KEY": incorrect passphrase supplied to decrypt private key
fstat(3, {st_mode=S_IFREG|0400, st_size=491, ...}) = 0
read(3, "-----BEGIN OPENSSH PRIVATE KEY--"..., 1024) = 491
read(3, "", 533) = 0
read(3, "", 1024) = 0
close(3) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
open("/dev/tty", O_RDWR) = -1 ENOENT (No such file or directory)
OR ssh complaining with:
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
So check your private SSH keyfile and make sure there's a newline at the end of file.
Check it with ssh-keygen -y -f KEY
, it should print the pubkey.