I am able to clone a session after configure the configure file under .ssh
cat .ssh/config
host *
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p
ServerAliveInterval 60
After I connect to the remote server once, then I don't need to input password to it when connect to it the second time using the clone session approach.
But looks like emacs couldn't clone the session. When I open a file on emacs, it still need to ask for password. Is there anything additional need to configure?
The tramp I am using is:
tramp is a built-in package.
Status: Built-In.
Version: 2.2.13.25.1
Summary: Transparent Remote Access, Multiple Protocol
Other versions: 2.2.13.25.1 (builtin).
After I added the following to the .spacemacs (I am using spacemac).
(setq tramp-debug-buffer t)
(setq tramp-verbose 9)
In in the debug buffer I will see it has the following and hangs there.
;; GNU Emacs: 25.1.1 Tramp: 2.2.13.25.1 -*- mode: outline; -*-
16:03:10.771969 tramp-get-file-property (8) # file-attributes-string nil
16:03:10.772297 tramp-get-connection-property (7) # stat undef
16:03:10.772372 tramp-get-remote-stat (5) # Finding a suitable ‘stat’ command
16:03:10.772442 tramp-get-connection-property (7) # remote-path undef
16:03:10.772521 tramp-get-connection-property (7) # process-name nil
16:03:10.772591 tramp-get-connection-property (7) # process-name nil
16:03:10.772655 tramp-get-connection-property (7) # process-buffer nil
16:03:10.772759 tramp-file-name-handler (5) # Non-essential received in operation (file-attributes /ssh:test-server: string)
16:03:10.773157 tramp-get-connection-property (7) # uid-string nil
16:03:10.773240 tramp-get-connection-property (7) # gid-string nil
16:03:10.773315 tramp-get-file-property (8) # file-attributes-integer nil
16:03:10.773769 tramp-get-connection-property (7) # stat undef
16:03:10.773839 tramp-get-remote-stat (5) # Finding a suitable ‘stat’ command
16:03:10.773903 tramp-get-connection-property (7) # remote-path undef
16:03:10.773973 tramp-get-connection-property (7) # process-name nil
16:03:10.774048 tramp-get-connection-property (7) # process-name nil
16:03:10.774115 tramp-get-connection-property (7) # process-buffer nil
16:03:10.774194 tramp-file-name-handler (5) # Non-essential received in operation (file-attributes /ssh:test-server:)
16:03:10.774587 tramp-get-connection-property (7) # uid-integer nil
16:03:10.774665 tramp-get-connection-property (7) # gid-integer nil
16:03:10.774756 tramp-get-connection-property (7) # test undef
16:03:10.774820 tramp-get-test-command (5) # Finding a suitable ‘test’ command
16:03:10.774887 tramp-get-connection-property (7) # process-name nil
16:03:10.774959 tramp-get-connection-property (7) # process-name nil
16:03:10.775027 tramp-get-connection-property (7) # process-buffer nil
16:03:10.775106 tramp-file-name-handler (5) # Non-essential received in operation (file-readable-p /ssh:test-server:)
16:03:18.005921 tramp-get-file-property (8) # file-attributes-integer nil
16:03:18.006013 tramp-get-file-property (8) # file-attributes-string nil
16:03:18.006082 tramp-get-connection-property (7) # file-exists undef
16:03:18.006163 tramp-get-file-exists-command (5) # Finding command to check if file exists
16:03:18.006258 tramp-get-connection-property (7) # test undef
16:03:18.006321 tramp-get-test-command (5) # Finding a suitable ‘test’ command
16:03:18.006399 tramp-get-connection-property (7) # process-name nil
16:03:18.006467 tramp-get-connection-property (7) # process-name nil
16:03:18.006540 tramp-get-connection-property (7) # process-buffer nil
16:03:18.006648 tramp-file-name-handler (5) # Non-essential received in operation (file-exists-p /ssh:test-server:)
tramp-use-ssh-controlmaster-options
tonil
, Tramp shouldn't overwrite your settings then.tramp-verbose
option to get more info on where it's hanging.tramp-actions-before-shell
example.