I have 2 operating systems: Windows XP and Linux Slackware.

In both operating systems I have the following text in ~/.ssh/config:

Host beta
HostName <server IP>
User beta
Port 22

I can connect to ssh directly from shells, using the command: ssh beta. When I run C-x C-f and then /ssh:beta:/home/beta in Linux it works, the directory is opened in dired. On Windows it hangs. In *Messages* buffer I get the following:

Tramp: Opening connection for beta using ssh...
Tramp: Sending command `ssh   -o ControlMaster=auto -o ControlPath='tramp.%r@%h:%p' -o ControlPersist=no -e none beta && exit || exit'
Tramp: Waiting for prompts from remote shell...failed
Tramp: Opening connection for beta using ssh...failed

How to fix?

  • What is your ssh client? WinXP has none by default, so that's critical information. I'm slightly dubious that ControlMaster is available on Windows (it's certainly not if you're using Cygwin, last I knew). It used to be the case that you needed to use the sshx tramp method with a Cygwin-based ssh client, so try that? (or plink if you're using PuTTY). – phils Apr 27 '16 at 8:26
  • @phils I have Cygwin ssh client on Windows: OpenSSH_6.2p2, OpenSSL 1.0.1e 11 Feb 2013. It works both from cygwin bash shell and from Windows command prompt. – user4035 Apr 27 '16 at 8:40
  • There are known issues with Cygwin and Tramp when it comes to transfer the password. Does Emacs asks you for the remote password? If yes, please use ssh agent in order to avoid this. – Michael Albinus Apr 27 '16 at 12:01
  • @MichaelAlbinus "Does Emacs asks you for the remote password?" - no – user4035 Apr 27 '16 at 17:34
  • 2
    Then pls apply (setq tramp-verbose 10). Rerun your test. There will be a Tramp debug buffer, which shall tell us the story. – Michael Albinus Apr 27 '16 at 18:50

Try sshx command instead of ssh when opening with C-x C-f

For more, search sshx at https://www.gnu.org/software/tramp/

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.