When I manually login into remote server, it first needs to input password, and then input some youbikey like the following prompt.

Password:    (after I input password correctly, then it will show the next line.)
Tap your Key:

Then in tramp, after I input password correctly, it hangs there without any further info. How to make it work in tramp?

I am already using version 25.

So the following doesn't work for me. Tramp login with 2-factor authentication

  • Why doesn't work the solution you've referenced to? Could you show how it fails? Oct 25 '16 at 8:07
  • After I input the password, it should asked again for "tap your YubiKey", but it doesn't show that. The reality is after I input the password, press Enter, but that press doesn't make any change.I expected it should show some other message to let me input more.
    – Daniel Wu
    Oct 26 '16 at 1:49
  • after I add "Tap your Key" to the variable of password-word-equivalents, now it works. thanks. But still can't reuse an existing ssh connection from iterm2 (I have ask it in another question). I will close this now for now.
    – Daniel Wu
    Oct 26 '16 at 2:08

In the file macs-plus/25.1/share/emacs/25.1/lisp/simple.el.gz I added "Tap your Key" to password-word-equivalents, then it works.

(defcustom password-word-equivalents
  '("password" "passcode" "passphrase" "pass phrase"
    ; These are sorted according to the GNU en_US locale.
    "암호"        ; ko
    "Tap your Key" ; for 2 factor
    "パスワード" ; ja
  • 2
    In general, you shouldn't edit that file. Your changes will be overwritten next time you get a fresh emacs. It would be better to adapt password-word-equivalents in your .emacs. Oct 26 '16 at 12:37

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.