Adrian Lanz <[EMAIL PROTECTED]> writes:
> I don't know why, but my ssh stores the hostkeys in the directory
> mentioned in the subject of the message. Has anybody a function to
> parse such a directory for use in tramp-completion-function-alist? Or
> should/could I change my ssh configuration or ssh call?
Because I use OpenSSH, I was too lazy implementing SSH2 host name
completion ...
You can try this one:
---
(defun my-parse-shostkeys (dirname)
"Return a list of (user host) tuples allowed to access.
User is always nil."
(let ((regexp (concat "^key_[0-9]+_\\(" tramp-host-regexp "\\)\\.pub$"))
(files (directory-files dirname))
result)
(while files
(when (string-match regexp (car files))
(push (list nil (match-string 1 (car files))) result))
(setq files (cdr files)))
result))
(tramp-set-completion-function "ssh"
(append tramp-completion-function-alist-ssh
'((my-parse-shostkeys "~/.ssh2/hostkeys"))))
---
Please let me know whether this works for you.
> Thanks, Adrian.
Best regards, Michael.
_______________________________________________
Tramp-devel mailing list
[EMAIL PROTECTED]
http://mail.nongnu.org/mailman/listinfo/tramp-devel