Emacs+tramp+를 활용
-
11-09-2019 - |
문제
를 이맥스 부정기선에서 실행되는 윈도우 XP 에서 일하기 위하여 퍼티를 활용에 Amazon EC2 인스턴스입니다.문서에 대한 이 스파스입니다.내가 찾을 수 있는 부분적인 문서를,그러나 아무도 해결하는 데 필요한 모든 단계이다.
할 수 있는 사람이 제공을 통해 도보 또는 포인터를 통해 걸?
해결책
(add-to-list 'load-path
(expand-file-name "C:/tools/emacsw32/emacs/lisp/tramp/lisp"))
(require 'tramp)
;(setq tramp-chunksize "500")
(setq tramp-default-method "plink")
내 dot-emacs 파일에서. 더 많은 메모를 찾으면 여기에 추가하겠습니다.
다른 팁
나는 것이 있다고 가정합니다 GNU/리눅스 서버에 액세스할 사용자 이름과.ppk 파일입니다.또한,Emacs24.4+.
먼저 설정을 서버에 퍼티를 구성
- 섹션에서 세션 지정 호스트 이름을 예를 들어,
username@server
. - 섹션 연결>SSH>인증 및 검색에 대한"개인 키 파일에 대한 인증을".
- 다시 섹션 세션에 이름을 저장된 세션,예를 들어
putty-test
, 고,저장 버튼을 클릭합니다. - 확인을 클릭하여 연결 상태를 표시합니다.그것이 작동하는 경우,당신은 닫을 수 있습니다 지금 이들.
다음으로,머리를 Emacs.
- 는지 확인 이맥스 알고 있는
plink.exe
입니다.방법 중 하나는 그냥 알리 이맥스에서 직접.emacs
, 예를 들어 나는 순간에,(setenv "PATH" (concat "c:/Users/Brady/Documents/putty/;" (getenv "PATH")))
- 단순히 형식
C-x C-f //plink:putty-test:/ RET
.잠시만 기다려면서 그것을 연결하고,창문이 열려dired
버퍼에 원~/
디렉토리에 있습니다.
이것은 나에게 효과가있었습니다.
- 윈도우 10
- Emacs는 발견했습니다 https://sourceforge.net/projects/emacsbinw64/files/release/.
- cygwin64
- 퍼티.
- https://github.com/d5884/fakecygpty
원본의 변경 tramp-sh.el
~이다
- Cygwin의 경우 SSH와 함께 Fakeceysppty를 사용하고 프롬프트를 변경하십시오.
##
- Plink의 경우 제거하십시오
-ssh
옵션
나는 또한이 방법의 이름을 바꿨습니다 w
그것을 구별하기 위해.
(when (string-equal system-type "windows-nt")
(add-to-list 'tramp-methods
`("sshw"
(tramp-login-program "fakecygpty ssh")
;; ("%h") must be a single element, see `tramp-compute-multi-hops'.
(tramp-login-args (("-l" "%u" "-o \"StrictHostKeyChecking=no\"") ("-P" "%p") ("-t")
("%h") ("\"")
(,(format
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
tramp-terminal-type
"##"))
("/bin/sh") ("\"")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-default-port 22))
)
(add-to-list 'tramp-methods
`("plinkw"
(tramp-login-program "plink")
;; ("%h") must be a single element, see `tramp-compute-multi-hops'.
(tramp-login-args (("-l" "%u") ("-P" "%p") ("-t")
("%h") ("\"")
(,(format
"env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'"
tramp-terminal-type
"$"))
("/bin/sh") ("\"")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login ("-l"))
(tramp-remote-shell-args ("-c"))
(tramp-default-port 22))
)
)
제휴하지 않습니다 StackOverflow