From my machine Windows 10, I connect to remote Linux machine by private like this (in console)

ssh -i d:\Remote\key\privatekey myLogin@some_remote_host

success connect:

Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.15.0-1026-gcp 

Nice. Now I want by Tramp mode to connect:

C-x C-f 


But I get error:

enter image description here


If you connect via ssh in the shell, you shall use ssh/scp also as Tramp connection method. Access the file as /scp:mylogin@ip_address:

The keyfile must be configured in ~/.ssh/config (don't know what's the Windows equivalent) like

IdentityFile d:\Remote\QS\exchange\key\path_to_primary_key@ip_address
| improve this answer | |
  • I copy private key to c:\Users\Alexei\.ssh\ , but it not help. Same error. – a_subscriber Apr 24 '19 at 6:58
  • Well, I cannot say too much about Microsoft's ssh implementation. What I wrote was about GNU/Linux. Maybe you contact the documentation, whether there are different details compared to what I wrote. – Michael Albinus Apr 24 '19 at 10:18

At least in my case I had to aad this to my ~/.ssh/config:

Host yourserverid2232323.amazonaws.com
    IdentityFile /home/justin/.ssh/aws-instance-1.pem

Now I can use Tramp like I would with my default ssh key.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.