2

I've having serious trouble using tramp on Emacs. I am continuously being asked for my password when I ssh into a server via tramp. This is to the point where it blocks me being able to do anything.

I have looked far and wide on the internet and the most widely used solutions do not seem to work for me.

Here is my tramp setup in my .emacs.d for the curious http://pastebin.com/NJCaa0RH.

Has anyone else had this problem and can point me in the way of a fix? Or do you see a glaring error in tramp config?

Community
  • 1
  • 1
Cain
  • 191
  • 3
  • 13
  • 1
    You may have more luck getting an answer for this question on SE site dedicated for Emacs: https://emacs.stackexchange.com/ – Arkadiusz Drabczyk Jan 27 '16 at 22:25
  • Have you tried setting up an ssh-agent? I've found this works much better with tramp as then you only get prompted for your passphrase once. The ohter thing to look at is to turn on tramp debugging and check what the response is from the remote server. I have had problems like this when the response from the server does ot match what tramp is expecting. When you say you get asked for your password all the time, do you mean it just continually asks for your password or are you able to enter your password, work for a little bit and then get asked again? – Tim X Jan 28 '16 at 12:26

1 Answers1

0
  • Make sure you can login via keys instead of password. This would involve copying ~/.ssh/id_rsa.pub or ~/.ssh/id_ed25519.pub from your local machine and pasting the same in ~/.ssh/authorized_keys on the server

  • Having a ssh config should help simplify the syntax

  • Having a persistent connection would also help with your problem

    (customize-set-variable
    'tramp-ssh-controlmaster-options
    (concat
       "-o ControlPath=/tmp/ssh-ControlPath-%%r@%%h:%%p "
       "-o ControlMaster=auto -o ControlPersist=yes"))
    
Vasantha Ganesh
  • 4,570
  • 3
  • 25
  • 33