Using cygwin's latest emacs, 24.5.1 (i686-pc-cygwin) of 2015-06-23...
I tried to use ssh -i to ssh into an amazon ec2 instance.
M-x
ssh arguments (hostname first) ssh [email protected] -i ~/.ssh/amazon-devel.pem
Warning: Identity file ~/.ssh/amazon-devel.pem not accessible: No such file or directory.
Permission denied (publickey).
Process *ssh [email protected]* exited abnormally with code 255
$ ssh -v [email protected] -i ~/.ssh/amazon-devel.pem
OpenSSH_7.1p1, OpenSSL 1.0.2e 3 Dec 2015
debug1: Reading configuration data /c/Users/Jerry/.ssh/config
debug1: Connecting to ec2...] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Jerry/.ssh/amazon-devel.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file /c/Users/Jerry/.ssh/amazon-devel.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
...
debug1: Entering interactive session.
Welcome to Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-48-generic x86_64)
...
Last login: Sat Jan 16 22:26:25 2016
ubuntu@ip:~$
...
I believe the issue is that the elisp ssh is not doing the file name expansion that the shell does before exec'ing the actual ssh.